diff --git a/examples/race-events/.env.template b/apps/race-events/.env.template similarity index 100% rename from examples/race-events/.env.template rename to apps/race-events/.env.template diff --git a/examples/race-events/README.md b/apps/race-events/README.md similarity index 100% rename from examples/race-events/README.md rename to apps/race-events/README.md diff --git a/examples/race-events/package.json b/apps/race-events/package.json similarity index 93% rename from examples/race-events/package.json rename to apps/race-events/package.json index c4e4e6d..86b2906 100644 --- a/examples/race-events/package.json +++ b/apps/race-events/package.json @@ -6,6 +6,7 @@ "type": "module", "scripts": { "build": "tsc", + "build:executable": "pnpm bundle && pnpm --parallel --stream '/^build:executable:.+$/'", "build:executable:macos": "./scripts/build-executable-macos.sh", "build:executable:windows": "./scripts/build-executable-windows.sh", "bundle": "esbuild ./src/index.ts --bundle --platform=node --outfile=build/index.cjs --format=cjs", diff --git a/examples/race-events/scripts/build-executable-macos.sh b/apps/race-events/scripts/build-executable-macos.sh similarity index 100% rename from examples/race-events/scripts/build-executable-macos.sh rename to apps/race-events/scripts/build-executable-macos.sh diff --git a/examples/race-events/scripts/build-executable-windows.sh b/apps/race-events/scripts/build-executable-windows.sh similarity index 100% rename from examples/race-events/scripts/build-executable-windows.sh rename to apps/race-events/scripts/build-executable-windows.sh diff --git a/examples/race-events/sea-config.json b/apps/race-events/sea-config.json similarity index 100% rename from examples/race-events/sea-config.json rename to apps/race-events/sea-config.json diff --git a/examples/race-events/src/PaceOrderFormatter.ts b/apps/race-events/src/PaceOrderFormatter.ts similarity index 100% rename from examples/race-events/src/PaceOrderFormatter.ts rename to apps/race-events/src/PaceOrderFormatter.ts diff --git a/examples/race-events/src/index.ts b/apps/race-events/src/index.ts similarity index 100% rename from examples/race-events/src/index.ts rename to apps/race-events/src/index.ts diff --git a/examples/race-events/logging.ts b/apps/race-events/src/logging.ts similarity index 100% rename from examples/race-events/logging.ts rename to apps/race-events/src/logging.ts diff --git a/examples/race-events/tsconfig.json b/apps/race-events/tsconfig.json similarity index 100% rename from examples/race-events/tsconfig.json rename to apps/race-events/tsconfig.json diff --git a/apps/sync-car-assets-cli/.env.template b/apps/sync-car-assets-cli/.env.template new file mode 100644 index 0000000..312491c --- /dev/null +++ b/apps/sync-car-assets-cli/.env.template @@ -0,0 +1,5 @@ +IRACING_AUTH_CLIENT="" +IRACING_AUTH_SECRET="" +IRACING_AUTH_USERNAME="" +IRACING_AUTH_PASSWORD="" +IRACING_AUTH_SCOPE="iracing.auth iracing.profile" \ No newline at end of file diff --git a/apps/sync-car-assets-cli/package.json b/apps/sync-car-assets-cli/package.json new file mode 100644 index 0000000..b955289 --- /dev/null +++ b/apps/sync-car-assets-cli/package.json @@ -0,0 +1,28 @@ +{ + "name": "@iracing-data/sync-car-assets-cli", + "main": "dist/index.js", + "bin": { + "sync-iracing-car-assets": "dist/index.js" + }, + "scripts": { + "build": "tsc --build tsconfig.build.json", + "build:executable": "pnpm --parallel --stream '/^build:executable:.+$/'", + "build:executable:macos": "./scripts/build-executable-macos.sh", + "build:executable:windows": "./scripts/build-executable-windows.sh", + "bundle": "esbuild src/index.ts --bundle --platform=node --tsconfig=tsconfig.build.json --outfile=build/index.cjs --format=cjs", + "codegen": "pnpm codegen:openapi:types", + "codegen:openapi:types": "openapi-typescript ../../openapi/iracing-oauth.json -o src/generated/openapi.ts", + "test:ts": "tsc --noEmit" + }, + "dependencies": { + "@iracing-data/api-client-fetch": "workspace:*", + "@iracing-data/sync-car-assets": "workspace:*", + "commander": "^14.0.2", + "openapi-fetch": "^0.15.0" + }, + "devDependencies": { + "@commander-js/extra-typings": "^14.0.0", + "esbuild": "^0.27.0", + "openapi-typescript": "7.10.1" + } +} \ No newline at end of file diff --git a/packages/helpers/sync-car-assets/scripts/build-executable-macos.sh b/apps/sync-car-assets-cli/scripts/build-executable-macos.sh similarity index 100% rename from packages/helpers/sync-car-assets/scripts/build-executable-macos.sh rename to apps/sync-car-assets-cli/scripts/build-executable-macos.sh diff --git a/packages/helpers/sync-car-assets/scripts/build-executable-windows.sh b/apps/sync-car-assets-cli/scripts/build-executable-windows.sh similarity index 100% rename from packages/helpers/sync-car-assets/scripts/build-executable-windows.sh rename to apps/sync-car-assets-cli/scripts/build-executable-windows.sh diff --git a/packages/helpers/sync-car-assets/sea-config.json b/apps/sync-car-assets-cli/sea-config.json similarity index 74% rename from packages/helpers/sync-car-assets/sea-config.json rename to apps/sync-car-assets-cli/sea-config.json index 651f857..ff27b42 100644 --- a/packages/helpers/sync-car-assets/sea-config.json +++ b/apps/sync-car-assets-cli/sea-config.json @@ -1,5 +1,5 @@ { - "main": "build/cli.cjs", + "main": "build/index.cjs", "output": "build/sync-car-assets.blob", "disableExperimentalSEAWarning": true } \ No newline at end of file diff --git a/apps/sync-car-assets-cli/src/generated/openapi.ts b/apps/sync-car-assets-cli/src/generated/openapi.ts new file mode 100644 index 0000000..8618c73 --- /dev/null +++ b/apps/sync-car-assets-cli/src/generated/openapi.ts @@ -0,0 +1,432 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/iracing/profile": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getProfile"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getSessions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/revoke/current": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["revokeCurrent"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/revoke/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["revokeSessions"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/revoke/client": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["revokeClient"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/authorize": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["authorize"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/token": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["exchangeToken"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + tokenGrantParameters: + | components["schemas"]["authorizationCodeGrant"] + | components["schemas"]["refreshTokenGrant"] + | components["schemas"]["passwordLimitedGrant"]; + authorizationCodeGrant: { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + grant_type: "authorization_code"; + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description The client secret issued during registration. */ + client_secret?: string; + /** @description As returned to the redirect_uri of the client. */ + code: string; + /** @description The same redirect_uri used to `/authorize`. */ + redirect_uri: string; + /** @description The PKCE code verifier which is only required if a code_challenge was used to `/authorize``. */ + code_verifier?: string; + }; + refreshTokenGrant: { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + grant_type: "refresh_token"; + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description The client secret issued during registration. */ + client_secret?: string; + /** @description As returned in the `/token` response. */ + refresh_token: string; + }; + passwordLimitedGrant: { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + grant_type: "password_limited"; + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description The client secret issued during registration. */ + client_secret: string; + /** @description The email address or other issued identifier for a user. */ + username: string; + /** @description The password of the user. Password must be masked with the `username` before it is sent to the server. */ + password: string; + /** @description One or more scopes to request, if any, separated by whitespace. */ + scope?: string; + }; + tokenGrantResponse: { + /** @description The access token may be used to authorize a connection to a resource server. The value is considered opaque and its format may change without warning at our discretion. */ + access_token: string; + /** @constant */ + token_type: "bearer"; + /** @description The number of seconds after which this access token will no longer be considered valid. */ + expires_in: number; + /** @description The refresh token may be used in a Refresh Token Grant to obtain new access and refresh tokens. Each refresh token may only be used once. The value is considered opaque and its format may change without warning at our discretion. */ + refresh_token?: string; + /** @description The number of seconds after which this refresh token will no longer be considered valid. The server may not issue a refresh token, in which case this field will be omitted. */ + refresh_token_expires_in?: number; + /** @description One or more scopes to request, if any, separated by whitespace. */ + scope?: string; + }; + }; + responses: { + /** @description Session(s) were successfully revoked. */ + SessionsRevoked: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content?: never; + }; + /** @description Access token is missing or invalid. */ + Unauthorized: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status: number; + status_reason: string; + error: string; + error_description: string; + error_uri: string; + state?: string; + }; + }; + }; + }; + parameters: never; + requestBodies: never; + headers: { + /** @description Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues. */ + "x-request-id": string; + }; + pathItems: never; +} +export type $defs = Record; +export interface operations { + getProfile: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": { + iracing_name: string; + iracing_cust_id: number; + }; + }; + }; + 401: components["responses"]["Unauthorized"]; + }; + }; + getSessions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": { + sessions: { + /** @description A session identifier. This value is considered opaque and its format may change without warning at our discretion. */ + session_id: string; + /** @description A client identifier. */ + client_id: string; + /** @description The name of the client as selected during client registration. */ + client_name: string; + client_developer_name: string | null; + client_developer_url: string | null; + client_developer_email: string | null; + scope: string | null; + scope_descriptions: string | null; + current_session: boolean; + impersonated: boolean; + impersonation_note: string | null; + first_ip: string | null; + first_continent: string | null; + first_country: string | null; + first_subdivisions: string | null; + first_city: string | null; + first_user_agent_header: string | null; + first_user_agent_operating_system: string | null; + first_user_agent_browser: string | null; + last_ip: string | null; + last_continent: string | null; + last_country: string | null; + last_subdivisions: string | null; + last_city: string | null; + last_user_agent_header: string | null; + last_user_agent_operating_system: string | null; + last_user_agent_browser: string | null; + }[]; + }; + }; + }; + 401: components["responses"]["Unauthorized"]; + }; + }; + revokeCurrent: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + forgetBrowser?: boolean; + }; + }; + }; + responses: { + 200: components["responses"]["SessionsRevoked"]; + 401: components["responses"]["Unauthorized"]; + }; + }; + revokeSessions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + sessionIds: string[]; + }; + }; + }; + responses: { + 200: components["responses"]["SessionsRevoked"]; + 401: components["responses"]["Unauthorized"]; + }; + }; + revokeClient: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components["responses"]["SessionsRevoked"]; + 401: components["responses"]["Unauthorized"]; + }; + }; + authorize: { + parameters: { + query: { + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description A redirect URI registered to the client, which must match exactly. */ + redirect_uri: string; + /** @description The only valid value for this is code. */ + response_type: "code"; + /** @description A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless. */ + code_challenge?: string; + /** @description The PKCE code challenge method. Either S256 (recommended) or plain. */ + code_challenge_method?: "plain" | "S256"; + /** @description This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks. */ + state?: string; + scope?: string; + /** @description Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user. */ + prompt?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Redirect back to the provided redirect_uri */ + 302: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + exchangeToken: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["tokenGrantParameters"]; + }; + }; + responses: { + /** @description Success */ + 200: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["tokenGrantResponse"]; + }; + }; + /** @description Failure */ + 400: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": { + status: number; + status_reason: string; + error: string; + error_description: string; + error_uri: string; + state?: string; + }; + }; + }; + }; + }; +} diff --git a/apps/sync-car-assets-cli/src/index.ts b/apps/sync-car-assets-cli/src/index.ts new file mode 100644 index 0000000..e3ca702 --- /dev/null +++ b/apps/sync-car-assets-cli/src/index.ts @@ -0,0 +1,79 @@ +#!/usr/bin/env node + +import crypto from "node:crypto"; +import { Command } from "@commander-js/extra-typings"; +import { CarApi, Configuration } from "@iracing-data/api-client-fetch"; +import { syncCarAssets } from "@iracing-data/sync-car-assets"; +import * as dotenv from "dotenv"; +import createClient from "openapi-fetch"; +import type { paths } from "./generated/openapi"; + +dotenv.config(); + +async function hashPassword(email: string, password: string) { + return crypto + .createHash("sha256") + .update(password + email.toLowerCase()) + .digest("base64"); +} + +const program = new Command("sync-iracing-car-assets") + .description("Downloads the latest car assets.") + .requiredOption("-o, --out-dir ", "Output directory") + .option("-i, --write-full-info", "Write full car info", false) + .option("--skip-info", "Skip writing car info", false) + .option("-a, --write-full-assets", "Write full car assets", false) + .option("--skip-assets", "Skip writing car asset", false) + .action(async (_, command) => { + console.log("Downloading car assets..."); + + const username = process.env.IRACING_AUTH_USERNAME!; + const password = process.env.IRACING_AUTH_PASSWORD!; + + /** + * Authorize the consumer with a password limited grant from iRacing OAuth services + */ + const client = createClient({ + baseUrl: "https://oauth.iracing.com/oauth2", + }); + + const session = await client.POST("/token", { + body: { + grant_type: "password_limited", + client_id: process.env.IRACING_AUTH_CLIENT!, + client_secret: process.env.IRACING_AUTH_SECRET!, + username: username, + password: await hashPassword(username, password), + scope: process.env.IRACING_AUTH_SCOPE!, + }, + }); + + // TODO: Store the session somewhere? + + const { + outDir, + writeFullAssets, + writeFullInfo, + skipInfo: skipCarInfo, + skipAssets: skipCarAssets, + } = command.optsWithGlobals(); + + await syncCarAssets( + { + outputDir: outDir, + writeFullAssets, + writeFullInfo, + skipCarAssets, + skipCarInfo, + }, + new CarApi( + new Configuration({ + accessToken: session.data?.access_token, + }) + ) + ); + + console.log("Done!"); + }); + +program.parse(); diff --git a/apps/sync-car-assets-cli/tsconfig.build.json b/apps/sync-car-assets-cli/tsconfig.build.json new file mode 100644 index 0000000..231b582 --- /dev/null +++ b/apps/sync-car-assets-cli/tsconfig.build.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "module": "nodenext", + "moduleResolution": "nodenext", + "noUnusedLocals": false, + "declarationMap": false, + "sourceMap": false, + "isolatedModules": false, + "paths": { + "@/*": ["./src/*"] + }, + "lib": ["es6"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/api/tsconfig.json b/apps/sync-car-assets-cli/tsconfig.json similarity index 100% rename from packages/api/tsconfig.json rename to apps/sync-car-assets-cli/tsconfig.json diff --git a/apps/sync-track-assets-cli/.env.template b/apps/sync-track-assets-cli/.env.template new file mode 100644 index 0000000..312491c --- /dev/null +++ b/apps/sync-track-assets-cli/.env.template @@ -0,0 +1,5 @@ +IRACING_AUTH_CLIENT="" +IRACING_AUTH_SECRET="" +IRACING_AUTH_USERNAME="" +IRACING_AUTH_PASSWORD="" +IRACING_AUTH_SCOPE="iracing.auth iracing.profile" \ No newline at end of file diff --git a/apps/sync-track-assets-cli/package.json b/apps/sync-track-assets-cli/package.json new file mode 100644 index 0000000..db3512a --- /dev/null +++ b/apps/sync-track-assets-cli/package.json @@ -0,0 +1,28 @@ +{ + "name": "@iracing-data/sync-track-assets-cli", + "main": "dist/index.js", + "bin": { + "sync-iracing-track-assets": "dist/index.js" + }, + "scripts": { + "build": "tsc --build tsconfig.build.json", + "build:executable": "pnpm bundle && pnpm --parallel --stream '/^build:executable:.+$/'", + "build:executable:macos": "./scripts/build-executable-macos.sh", + "build:executable:windows": "./scripts/build-executable-windows.sh", + "bundle": "esbuild src/index.ts --bundle --platform=node --tsconfig=tsconfig.build.json --outfile=build/index.cjs --format=cjs", + "codegen": "pnpm codegen:openapi:types", + "codegen:openapi:types": "openapi-typescript ../../openapi/iracing-oauth.json -o src/generated/openapi.ts", + "test:ts": "tsc --noEmit" + }, + "dependencies": { + "@iracing-data/api-client-fetch": "workspace:*", + "@iracing-data/sync-track-assets": "workspace:*", + "commander": "^14.0.2", + "openapi-fetch": "^0.15.0" + }, + "devDependencies": { + "@commander-js/extra-typings": "^14.0.0", + "esbuild": "^0.27.0", + "openapi-typescript": "7.10.1" + } +} \ No newline at end of file diff --git a/apps/sync-track-assets-cli/scripts/build-executable-macos.sh b/apps/sync-track-assets-cli/scripts/build-executable-macos.sh new file mode 100755 index 0000000..421fa3d --- /dev/null +++ b/apps/sync-track-assets-cli/scripts/build-executable-macos.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo "Building MacOS executable" + +mkdir -p build/macos +node --experimental-sea-config sea-config.json + +cp $(command -v node) build/macos/sync-track-assets + +codesign --remove-signature build/macos/sync-track-assets + +pnpm dlx postject build/macos/sync-track-assets NODE_SEA_BLOB build/sync-track-assets.blob \ + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ + --macho-segment-name NODE_SEA + +codesign --sign - build/macos/sync-track-assets \ No newline at end of file diff --git a/apps/sync-track-assets-cli/scripts/build-executable-windows.sh b/apps/sync-track-assets-cli/scripts/build-executable-windows.sh new file mode 100644 index 0000000..fa87918 --- /dev/null +++ b/apps/sync-track-assets-cli/scripts/build-executable-windows.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +echo "Building Windows executable" + +mkdir -p build/windows +node --experimental-sea-config sea-config.json + +node -e "require('fs').copyFileSync(process.execPath, 'build/windows/sync-track-assets.exe')" + +signtool remove /s build/windows/sync-track-assets.exe + +pnpm dlx postject build/windows/sync-track-assets.exe NODE_SEA_BLOB build/sync-track-assets.blob \ + --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 + +signtool sign /fd SHA256 build/windows/sync-track-assets.exe \ No newline at end of file diff --git a/apps/sync-track-assets-cli/sea-config.json b/apps/sync-track-assets-cli/sea-config.json new file mode 100644 index 0000000..c539504 --- /dev/null +++ b/apps/sync-track-assets-cli/sea-config.json @@ -0,0 +1,5 @@ +{ + "main": "build/index.cjs", + "output": "build/sync-track-assets.blob", + "disableExperimentalSEAWarning": true +} \ No newline at end of file diff --git a/apps/sync-track-assets-cli/src/generated/openapi.ts b/apps/sync-track-assets-cli/src/generated/openapi.ts new file mode 100644 index 0000000..8618c73 --- /dev/null +++ b/apps/sync-track-assets-cli/src/generated/openapi.ts @@ -0,0 +1,432 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/iracing/profile": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getProfile"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["getSessions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/revoke/current": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["revokeCurrent"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/revoke/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["revokeSessions"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/revoke/client": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["revokeClient"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/authorize": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["authorize"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/token": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post: operations["exchangeToken"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + tokenGrantParameters: + | components["schemas"]["authorizationCodeGrant"] + | components["schemas"]["refreshTokenGrant"] + | components["schemas"]["passwordLimitedGrant"]; + authorizationCodeGrant: { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + grant_type: "authorization_code"; + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description The client secret issued during registration. */ + client_secret?: string; + /** @description As returned to the redirect_uri of the client. */ + code: string; + /** @description The same redirect_uri used to `/authorize`. */ + redirect_uri: string; + /** @description The PKCE code verifier which is only required if a code_challenge was used to `/authorize``. */ + code_verifier?: string; + }; + refreshTokenGrant: { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + grant_type: "refresh_token"; + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description The client secret issued during registration. */ + client_secret?: string; + /** @description As returned in the `/token` response. */ + refresh_token: string; + }; + passwordLimitedGrant: { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + grant_type: "password_limited"; + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description The client secret issued during registration. */ + client_secret: string; + /** @description The email address or other issued identifier for a user. */ + username: string; + /** @description The password of the user. Password must be masked with the `username` before it is sent to the server. */ + password: string; + /** @description One or more scopes to request, if any, separated by whitespace. */ + scope?: string; + }; + tokenGrantResponse: { + /** @description The access token may be used to authorize a connection to a resource server. The value is considered opaque and its format may change without warning at our discretion. */ + access_token: string; + /** @constant */ + token_type: "bearer"; + /** @description The number of seconds after which this access token will no longer be considered valid. */ + expires_in: number; + /** @description The refresh token may be used in a Refresh Token Grant to obtain new access and refresh tokens. Each refresh token may only be used once. The value is considered opaque and its format may change without warning at our discretion. */ + refresh_token?: string; + /** @description The number of seconds after which this refresh token will no longer be considered valid. The server may not issue a refresh token, in which case this field will be omitted. */ + refresh_token_expires_in?: number; + /** @description One or more scopes to request, if any, separated by whitespace. */ + scope?: string; + }; + }; + responses: { + /** @description Session(s) were successfully revoked. */ + SessionsRevoked: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content?: never; + }; + /** @description Access token is missing or invalid. */ + Unauthorized: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + status: number; + status_reason: string; + error: string; + error_description: string; + error_uri: string; + state?: string; + }; + }; + }; + }; + parameters: never; + requestBodies: never; + headers: { + /** @description Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues. */ + "x-request-id": string; + }; + pathItems: never; +} +export type $defs = Record; +export interface operations { + getProfile: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": { + iracing_name: string; + iracing_cust_id: number; + }; + }; + }; + 401: components["responses"]["Unauthorized"]; + }; + }; + getSessions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success */ + 200: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": { + sessions: { + /** @description A session identifier. This value is considered opaque and its format may change without warning at our discretion. */ + session_id: string; + /** @description A client identifier. */ + client_id: string; + /** @description The name of the client as selected during client registration. */ + client_name: string; + client_developer_name: string | null; + client_developer_url: string | null; + client_developer_email: string | null; + scope: string | null; + scope_descriptions: string | null; + current_session: boolean; + impersonated: boolean; + impersonation_note: string | null; + first_ip: string | null; + first_continent: string | null; + first_country: string | null; + first_subdivisions: string | null; + first_city: string | null; + first_user_agent_header: string | null; + first_user_agent_operating_system: string | null; + first_user_agent_browser: string | null; + last_ip: string | null; + last_continent: string | null; + last_country: string | null; + last_subdivisions: string | null; + last_city: string | null; + last_user_agent_header: string | null; + last_user_agent_operating_system: string | null; + last_user_agent_browser: string | null; + }[]; + }; + }; + }; + 401: components["responses"]["Unauthorized"]; + }; + }; + revokeCurrent: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + forgetBrowser?: boolean; + }; + }; + }; + responses: { + 200: components["responses"]["SessionsRevoked"]; + 401: components["responses"]["Unauthorized"]; + }; + }; + revokeSessions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/x-www-form-urlencoded": { + sessionIds: string[]; + }; + }; + }; + responses: { + 200: components["responses"]["SessionsRevoked"]; + 401: components["responses"]["Unauthorized"]; + }; + }; + revokeClient: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + 200: components["responses"]["SessionsRevoked"]; + 401: components["responses"]["Unauthorized"]; + }; + }; + authorize: { + parameters: { + query: { + /** @description The client identifier issued during client registration. */ + client_id: string; + /** @description A redirect URI registered to the client, which must match exactly. */ + redirect_uri: string; + /** @description The only valid value for this is code. */ + response_type: "code"; + /** @description A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless. */ + code_challenge?: string; + /** @description The PKCE code challenge method. Either S256 (recommended) or plain. */ + code_challenge_method?: "plain" | "S256"; + /** @description This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks. */ + state?: string; + scope?: string; + /** @description Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user. */ + prompt?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Redirect back to the provided redirect_uri */ + 302: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + exchangeToken: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["tokenGrantParameters"]; + }; + }; + responses: { + /** @description Success */ + 200: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["tokenGrantResponse"]; + }; + }; + /** @description Failure */ + 400: { + headers: { + "x-request-id": components["headers"]["x-request-id"]; + [name: string]: unknown; + }; + content: { + "application/json": { + status: number; + status_reason: string; + error: string; + error_description: string; + error_uri: string; + state?: string; + }; + }; + }; + }; + }; +} diff --git a/apps/sync-track-assets-cli/src/index.ts b/apps/sync-track-assets-cli/src/index.ts new file mode 100644 index 0000000..33ce95a --- /dev/null +++ b/apps/sync-track-assets-cli/src/index.ts @@ -0,0 +1,88 @@ +#!/usr/bin/env node + +import crypto from "node:crypto"; +import { Command } from "@commander-js/extra-typings"; +import { Configuration, TrackApi } from "@iracing-data/api-client-fetch"; +import { syncTrackAssets } from "@iracing-data/sync-track-assets"; +import * as dotenv from "dotenv"; +import createClient from "openapi-fetch"; +import type { paths } from "./generated/openapi"; + +dotenv.config(); + +/** + * Compute the Base64‑encoded SHA‑256 hash of (password + email.toLowerCase()). + */ +export async function hashPassword(email: string, password: string) { + return crypto + .createHash("sha256") + .update(password + email.toLowerCase()) + .digest("base64"); +} + +const program = new Command("sync-iracing-track-assets") + .description("Downloads the latest track SVGs.") + .requiredOption("-o, --out-dir ", "Output directory") + .option("-f, --force", "Force download of existing SVG layers", false) + .option("-i, --write-full-info", "Write full track info", false) + .option("--skip-info", "Skip writing track info", false) + .option("-a, --write-full-assets", "Write full track assets", false) + .option("--skip-assets", "Skip writing track asset", false) + .option("--include-svgs", "Include SVGs", false) + .action(async (_, command) => { + console.log("Downloading track assets..."); + + const username = process.env.IRACING_AUTH_USERNAME!; + const password = process.env.IRACING_AUTH_PASSWORD!; + + /** + * Authorize the consumer with a password limited grant from iRacing OAuth services + */ + const client = createClient({ + baseUrl: "https://oauth.iracing.com/oauth2", + }); + + const session = await client.POST("/token", { + body: { + grant_type: "password_limited", + client_id: process.env.IRACING_AUTH_CLIENT!, + client_secret: process.env.IRACING_AUTH_SECRET!, + username: username, + password: await hashPassword(username, password), + scope: process.env.IRACING_AUTH_SCOPE!, + }, + }); + + // TODO: Store the session somewhere? + + const { + outDir, + writeFullAssets, + writeFullInfo, + skipAssets: skipTrackAssets, + skipInfo: skipTrackInfo, + includeSvgs, + force, + } = command.optsWithGlobals(); + + await syncTrackAssets( + { + outputDir: outDir, + writeFullAssets, + writeFullInfo, + skipTrackAssets, + skipTrackInfo, + force, + includeSVGs: includeSvgs, + }, + new TrackApi( + new Configuration({ + accessToken: session.data?.access_token, + }) + ) + ); + + console.log("Done!"); + }); + +program.parse(); diff --git a/apps/sync-track-assets-cli/tsconfig.build.json b/apps/sync-track-assets-cli/tsconfig.build.json new file mode 100644 index 0000000..231b582 --- /dev/null +++ b/apps/sync-track-assets-cli/tsconfig.build.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "module": "nodenext", + "moduleResolution": "nodenext", + "noUnusedLocals": false, + "declarationMap": false, + "sourceMap": false, + "isolatedModules": false, + "paths": { + "@/*": ["./src/*"] + }, + "lib": ["es6"] + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/apps/sync-track-assets-cli/tsconfig.json b/apps/sync-track-assets-cli/tsconfig.json new file mode 100644 index 0000000..5455dae --- /dev/null +++ b/apps/sync-track-assets-cli/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": [], + "references": [{ "path": "./tsconfig.build.json" }], + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/examples/iracing-proxy-api-example/.env.template b/examples/iracing-proxy-api-example/.env.template new file mode 100644 index 0000000..abff74b --- /dev/null +++ b/examples/iracing-proxy-api-example/.env.template @@ -0,0 +1,2 @@ +IRACING_AUTH_CLIENT="123456" +IRACING_AUTH_SECRET= \ No newline at end of file diff --git a/examples/oauth-example/package.json b/examples/iracing-proxy-api-example/package.json similarity index 68% rename from examples/oauth-example/package.json rename to examples/iracing-proxy-api-example/package.json index b51fc3f..a3e4e5b 100644 --- a/examples/oauth-example/package.json +++ b/examples/iracing-proxy-api-example/package.json @@ -1,5 +1,5 @@ { - "name": "iracing-oauth-example", + "name": "iracing-proxy-api-example", "version": "0.0.1", "type": "module", "main": "dist/index.js", @@ -8,16 +8,18 @@ "dev": "tsx watch --tsconfig tsconfig.build.json --env-file=.env src/index.ts" }, "dependencies": { - "@iracing-data/api": "workspace:*", + "@iracing-data/api-router": "workspace:*", "@iracing-data/oauth-client": "workspace:*", - "axios": "^1.7.9", + "@iracing-data/oauth-router": "workspace:*", "better-call": "^1.0.24", "cookie-parser": "^1.4.7", "express": "^5.1.0", + "express-jwt": "^8.5.1", + "jwt-decode": "^4.0.0", "zod": "^4.0.17" }, "devDependencies": { - "@types/express": "^5.0.3", + "@types/express": "^5.0.5", "@types/node": "^24.10.0", "tsx": "^4.19.0" } diff --git a/examples/iracing-proxy-api-example/src/config.ts b/examples/iracing-proxy-api-example/src/config.ts new file mode 100644 index 0000000..1f6c80d --- /dev/null +++ b/examples/iracing-proxy-api-example/src/config.ts @@ -0,0 +1,3 @@ +export const PORT = process.env.PORT || "3000"; +export const IRACING_AUTH_CLIENT = process.env.IRACING_AUTH_CLIENT!; +export const IRACING_AUTH_SECRET = process.env.IRACING_AUTH_SECRET; diff --git a/examples/iracing-proxy-api-example/src/index.ts b/examples/iracing-proxy-api-example/src/index.ts new file mode 100644 index 0000000..a5e9a99 --- /dev/null +++ b/examples/iracing-proxy-api-example/src/index.ts @@ -0,0 +1,119 @@ +import path from "node:path"; +import express from "express"; +import cookieParser from "cookie-parser"; +import { + createRouter as createIRacingRouter, + IracingAPIResponse, +} from "@iracing-data/api-router"; +import { createRouter as createOAuthRouter } from "@iracing-data/oauth-router"; +import { PORT } from "./config"; +import { page } from "./page"; +import { + getIRacingSession, + IRacingSessionRequest, + setIRacingSessionHeader, +} from "./middleware"; +import { toNodeHandler } from "better-call/node"; +import { toResponse } from "better-call"; +import oauthClient from "./oauth-client"; + +/** + * Create a router for handling iRacing API requests. + */ +const iracingRouter = createIRacingRouter({ + basePath: "/iracing", + openapi: { + path: "/reference", + }, + /** + * By default, the iRacing API responds with links that + * contain the data. Here, we parse the link, fetch the data, + * and return it directly. + */ + onResponse: async (response) => { + // TODO: Cache the data until the expiration date. + const json = await response.json(); + const { link, expires } = json as IracingAPIResponse; + + const expirationDate = new Date(expires); + if (expirationDate.getTime() < Date.now()) { + throw new Error("Data is expired!"); + } + + const data = await fetch(link); + const result = await data.json(); + + return toResponse(result); + }, +}); + +/** + * Create a router for handling iRacing OAuth requests. + */ +const oauthRouter = createOAuthRouter({ + oauthClient: oauthClient, + callbackPath: "/oauth/iracing/callback", + onCallback: (session, { request, setCookie, getHeader }) => { + setCookie("iracing-session", JSON.stringify(session), { + httpOnly: true, + }); + + const url = new URL(request.url); + url.pathname = "/"; + url.search = ""; + + return Response.redirect(url, 302); + }, + onSignOut: (_, { setCookie }) => { + setCookie("iracing-session", ""); + }, + onRequest: (request) => { + console.debug("Received request:", request); + }, + onResponse: (response) => { + console.debug("Received response:", response); + }, + onError: (error) => { + console.debug("Received error:", error); + }, + openapi: { + disabled: true, + }, +}); + +const oauthNodeHandler = toNodeHandler(oauthRouter.handler); + +const availablePaths = Object.values(iracingRouter.endpoints).map( + ({ path: endpointPath }) => path.join("/iracing", endpointPath) +); + +const availablePathsList = `
    ${availablePaths + .map((p) => `
  • ${p}
  • `) + .join("")}
`; + +const app = express(); +app.use(express.json(), express.urlencoded({ extended: true }), cookieParser()); + +app.get("/", getIRacingSession, (req: IRacingSessionRequest, res) => { + res + .type("html") + .send( + page( + req.accessToken + ? `

Authenticated with iRacing

Sign out${availablePathsList}` + : `

Login

Login with iRacing` + ) + ); +}); + +app.use( + "/iracing", + setIRacingSessionHeader, + toNodeHandler(iracingRouter.handler) +); + +app.use(oauthNodeHandler); + +app.listen(PORT, () => { + console.info(`Example app listening on port ${PORT}`); +}); diff --git a/examples/iracing-proxy-api-example/src/middleware.ts b/examples/iracing-proxy-api-example/src/middleware.ts new file mode 100644 index 0000000..1594363 --- /dev/null +++ b/examples/iracing-proxy-api-example/src/middleware.ts @@ -0,0 +1,97 @@ +import { Request, Response, NextFunction } from "express"; +import { jwtDecode } from "jwt-decode"; +import oauthClient from "./oauth-client"; + +export interface IRacingSessionRequest extends Request { + accessToken?: string; +} + +export async function getIRacingSession( + req: IRacingSessionRequest, + res: Response, + next: NextFunction +) { + req.accessToken = req.get("X-IRACING-ACCESS-TOKEN"); + if (!req.accessToken && req.cookies?.["iracing-session"]) { + const parsedSession = JSON.parse(req.cookies["iracing-session"]); + console.log("Got parsed session:", parsedSession); + const decoded = (jwtDecode(parsedSession.access_token) as any) || {}; + const exp = + typeof decoded.exp === "number" + ? decoded.exp + : parseInt(decoded.exp || "0", 10); + + // access token still valid + if (exp && Date.now() / 1000 < exp) { + req.accessToken = parsedSession.access_token; + return next(); + } + + // try to refresh if we have a refresh token + if (parsedSession.refresh_token) { + try { + const newSession = await oauthClient.refresh( + parsedSession.refresh_token + ); + + res.cookie("iracing-session", JSON.stringify(newSession), { + httpOnly: true, + secure: true, + }); + + req.accessToken = newSession.access_token; + return next(); + } catch { + res.clearCookie("iracing-session"); + return next(); + } + } + + // no valid access or refresh token + res.clearCookie("iracing-session"); + return next(); + } + + next(); +} + +export async function setIRacingSessionHeader(req, res, next) { + if (!req.get("X-IRACING-ACCESS-TOKEN") && req.cookies?.["iracing-session"]) { + try { + const session = JSON.parse(req.cookies["iracing-session"]); + const decoded = jwtDecode(session.access_token); + const exp = + typeof decoded.exp === "number" + ? decoded.exp + : parseInt(decoded.exp || "0", 10); + + // access token still valid + if (exp && Date.now() / 1000 < exp) { + req.headers["x-iracing-access-token"] = session.access_token; + return next(); + } + + // try to refresh if we have a refresh token + if (session.refresh_token) { + try { + const newSession = await oauthClient.refresh(session.refresh_token); + + res.cookie("iracing-session", JSON.stringify(newSession), { + httpOnly: true, + secure: true, + }); + + req.headers["x-iracing-access-token"] = newSession.access_token; + return next(); + } catch { + res.clearCookie("iracing-session"); + return next(); + } + } + } catch { + // ignore cookie parse errors + } + } + + next(); +} diff --git a/examples/oauth-example/src/oauth-client.ts b/examples/iracing-proxy-api-example/src/oauth-client.ts similarity index 56% rename from examples/oauth-example/src/oauth-client.ts rename to examples/iracing-proxy-api-example/src/oauth-client.ts index 333f87c..3622557 100644 --- a/examples/oauth-example/src/oauth-client.ts +++ b/examples/iracing-proxy-api-example/src/oauth-client.ts @@ -1,14 +1,15 @@ import { OAuthClient } from "@iracing-data/oauth-client"; +import { IRACING_AUTH_CLIENT, IRACING_AUTH_SECRET, PORT } from "./config"; import { InMemoryStore } from "./storage/memory"; -import { IRACING_CLIENT_ID, PORT } from "./config"; -export const client = new OAuthClient({ +export const oauthClient = new OAuthClient({ clientMetadata: { - clientId: IRACING_CLIENT_ID, + clientId: IRACING_AUTH_CLIENT, + clientSecret: IRACING_AUTH_SECRET, redirectUri: `http://127.0.0.1:${PORT}/oauth/iracing/callback`, scopes: ["iracing.profile", "iracing.auth"], }, stateStore: new InMemoryStore(), }); -export default client; +export default oauthClient; diff --git a/examples/oauth-example/src/page.ts b/examples/iracing-proxy-api-example/src/page.ts similarity index 100% rename from examples/oauth-example/src/page.ts rename to examples/iracing-proxy-api-example/src/page.ts diff --git a/examples/oauth-example/src/storage/memory.ts b/examples/iracing-proxy-api-example/src/storage/memory.ts similarity index 100% rename from examples/oauth-example/src/storage/memory.ts rename to examples/iracing-proxy-api-example/src/storage/memory.ts diff --git a/examples/oauth-example/tsconfig.build.json b/examples/iracing-proxy-api-example/tsconfig.build.json similarity index 100% rename from examples/oauth-example/tsconfig.build.json rename to examples/iracing-proxy-api-example/tsconfig.build.json diff --git a/examples/iracing-proxy-api-example/tsconfig.json b/examples/iracing-proxy-api-example/tsconfig.json new file mode 100644 index 0000000..5455dae --- /dev/null +++ b/examples/iracing-proxy-api-example/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": [], + "references": [{ "path": "./tsconfig.build.json" }], + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/examples/oauth-example/.env.template b/examples/oauth-example/.env.template deleted file mode 100644 index 3ae8bbb..0000000 --- a/examples/oauth-example/.env.template +++ /dev/null @@ -1 +0,0 @@ -IRACING_CLIENT_ID="123456" \ No newline at end of file diff --git a/examples/oauth-example/src/config.ts b/examples/oauth-example/src/config.ts deleted file mode 100644 index df82e99..0000000 --- a/examples/oauth-example/src/config.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const PORT = process.env.PORT || "3000"; -export const IRACING_CLIENT_ID = process.env.IRACING_CLIENT_ID!; diff --git a/examples/oauth-example/src/index.ts b/examples/oauth-example/src/index.ts deleted file mode 100644 index 900b8f3..0000000 --- a/examples/oauth-example/src/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { toNodeHandler } from "better-call/node"; -import express from "express"; -import cookieParser from "cookie-parser"; -import { page } from "./page"; -import { PORT } from "./config"; -import router from "./router"; - -const app = express(); -app.use(express.urlencoded({ extended: true }), cookieParser()); - -app.get("/", (req, res) => { - const hasToken = req.cookies?.["iracing-token"]; - - res - .type("html") - .send( - page( - hasToken - ? `

Authenticated with iRacing

Sign out` - : `

Login

Login with iRacing` - ) - ); -}); - -app.use(toNodeHandler(router.handler)); - -app.listen(PORT, () => { - console.info(`Example app listening on port ${PORT}`); -}); diff --git a/examples/oauth-example/src/router.ts b/examples/oauth-example/src/router.ts deleted file mode 100644 index 76f5836..0000000 --- a/examples/oauth-example/src/router.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createRouter } from "better-call"; -import * as routes from "./routes"; - -export const router = createRouter( - { ...routes }, - { - openapi: { - scalar: { - title: "iRacing OAuth Client Example API", - version: "0.0.1", - description: "An iRacing OAuth Client implementation example.", - }, - }, - } -); - -export default router; diff --git a/examples/oauth-example/src/routes/index.ts b/examples/oauth-example/src/routes/index.ts deleted file mode 100644 index 9c4ffc9..0000000 --- a/examples/oauth-example/src/routes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./iracing"; -export * from "./oauth"; diff --git a/examples/oauth-example/src/routes/iracing/auth/index.ts b/examples/oauth-example/src/routes/iracing/auth/index.ts deleted file mode 100644 index 6a8e0a9..0000000 --- a/examples/oauth-example/src/routes/iracing/auth/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const auth = createEndpoint( - "/auth", - { - method: "POST", - body: z.object({ - username: z.string(), - hashedPassword: z.string(), - }), - }, - async ({ context: { iracing }, body }) => { - return iracing.api.auth.auth(body); - } -); diff --git a/examples/oauth-example/src/routes/iracing/data/driver-stats.ts b/examples/oauth-example/src/routes/iracing/data/driver-stats.ts deleted file mode 100644 index 57f3ff2..0000000 --- a/examples/oauth-example/src/routes/iracing/data/driver-stats.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const category = createEndpoint( - "/data/driver_stats_by_category/:category", - { - method: "GET", - query: z.object({ - category: z.union([ - z.literal("oval"), - z.literal("road"), - z.literal("dirt_road"), - z.literal("dirt_oval"), - z.literal("sports_car"), - z.literal("formula_car"), - ]), - }), - // metadata: { - // openapi: { - // requestBody: { - // content: { - // "application/json": { - // schema: { - // type: "object", - // properties: { - // category: { - // type: "string", - // description: - // "The category to look up for the current driver.", - // }, - // }, - // }, - // }, - // }, - // }, - // }, - // }, - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.driverStats.category(query); - return response.data; - } -); diff --git a/examples/oauth-example/src/routes/iracing/data/league.ts b/examples/oauth-example/src/routes/iracing/data/league.ts deleted file mode 100644 index ae56c8e..0000000 --- a/examples/oauth-example/src/routes/iracing/data/league.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const directory = createEndpoint( - "/data/league/directory", - { - method: "GET", - query: z.object({ - search: z.string().optional(), - tag: z.string().optional(), - restrictToMember: z.boolean().optional(), - restrictToRecruiting: z.boolean().optional(), - restrictToFriends: z.boolean().optional(), - restrictToWatched: z.boolean().optional(), - minimumRosterCount: z.number().optional(), - maximumRosterCount: z.number().optional(), - lowerbound: z.number().optional(), - upperbound: z.number().optional(), - sort: z - .union([ - z.literal("relevance"), - z.literal("leaguename"), - z.literal("displayname"), - ]) - .optional(), - order: z.union([z.literal("asc"), z.literal("desc")]), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.directory(query); - } -); - -export const customerLeagueSessions = createEndpoint( - "/data/league/cust_league_sessions", - { - method: "GET", - query: z.object({ - mine: z.boolean().optional(), - packageId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.customerLeagueSessions(query); - } -); - -export const getLeague = createEndpoint( - "/data/league/get", - { - method: "GET", - query: z.object({ - leagueId: z.number(), - includeLicenses: z.boolean().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.get(query); - } -); - -export const getPointsSystem = createEndpoint( - "/data/league/get_points_systems", - { - method: "GET", - query: z.object({ - leagueId: z.number(), - seasonId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.getPointsSystems(query); - } -); - -export const leagueMembership = createEndpoint( - "/data/league/membership", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - includeLeague: z.boolean().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.membership(query); - } -); - -export const leagueRoster = createEndpoint( - "/data/league/roster", - { - method: "GET", - query: z.object({ - leagueId: z.number(), - includeLicenses: z.boolean().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.roster(query); - } -); - -export const leagueSeasons = createEndpoint( - "/data/league/seasons", - { - method: "GET", - query: z.object({ - leagueId: z.number(), - retired: z.boolean().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.seasons(query); - } -); - -export const seasonStandings = createEndpoint( - "/data/league/season_standings", - { - method: "GET", - query: z.object({ - leagueId: z.number(), - seasonId: z.number(), - carClassId: z.number().optional(), - carId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.seasonStandings(query); - } -); - -export const seasonSessions = createEndpoint( - "/data/league/season_sessions", - { - method: "GET", - query: z.object({ - leagueId: z.number(), - seasonId: z.number(), - resultsOnly: z.boolean().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - return iracing.api.data.league.seasonSessions(query); - } -); diff --git a/examples/oauth-example/src/routes/iracing/data/member.ts b/examples/oauth-example/src/routes/iracing/data/member.ts deleted file mode 100644 index a654122..0000000 --- a/examples/oauth-example/src/routes/iracing/data/member.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const awards = createEndpoint( - "/data/member/awards", - { - method: "GET", - requireHeaders: true, - query: z.object({ - customerId: z.coerce.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.member.awards(query); - return response.data; - } -); - -export const awardInstances = createEndpoint( - "/data/member/award_instances", - { - method: "GET", - requireHeaders: true, - query: z.object({ - customerId: z.coerce.number().optional(), - awardId: z.number(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.member.awardInstances(query); - return response.data; - } -); - -// export const chartData = createEndpoint( -// "/data/member/chart_data", -// { -// method: "GET", -// requireHeaders: true, -// query: z.object({ -// customerId: z.coerce.number().optional(), -// categoryId: CategoryIdValueSchema, -// chartType: ChartTypeValueSchema, -// }), -// }, -// async ({ context: { iracing }, query }) => { -// return iracing.api.data.member.chartData(query); -// } -// ); - -// export const getMember = createEndpoint( -// "/data/member/get", -// { method: "GET" }, -// async ({ context: { iracing }, query }) => { -// return iracing.api.data.member.get(query); -// } -// ); - -export const info = createEndpoint( - "/data/member/info", - { method: "GET" }, - async ({ context: { iracing } }) => { - const response = await iracing.api.data.member.info(); - return response.data; - } -); - -export const participationCredits = createEndpoint( - "/data/member/info", - { method: "GET" }, - async ({ context: { iracing } }) => { - const response = await iracing.api.data.member.participationCredits(); - return response.data; - } -); - -export const profile = createEndpoint( - "/data/member/profile", - { - method: "GET", - query: z.object({ - customerId: z.coerce.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.member.profile(query); - return response.data; - } -); diff --git a/examples/oauth-example/src/routes/iracing/data/season.ts b/examples/oauth-example/src/routes/iracing/data/season.ts deleted file mode 100644 index 551c693..0000000 --- a/examples/oauth-example/src/routes/iracing/data/season.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const list = createEndpoint( - "/data/season/list", - { - method: "GET", - query: z.object({ - seasonYear: z.number(), - seasonQuarter: z.number(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.season.list(query); - return response.data; - } -); - -export const raceGuide = createEndpoint( - "/data/season/race_guide", - { - method: "GET", - query: z.object({ - from: z.date(), - includeEndAfterFrom: z.boolean().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.season.raceGuide(query); - return response.data; - } -); - -// TODO: Spectator subsessionIds -// TODO: Spectator subsessionIds detail diff --git a/examples/oauth-example/src/routes/iracing/data/series.ts b/examples/oauth-example/src/routes/iracing/data/series.ts deleted file mode 100644 index de320cd..0000000 --- a/examples/oauth-example/src/routes/iracing/data/series.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const seriesAssets = createEndpoint( - "/data/series/assets", - { method: "GET" }, - async ({ context: { iracing } }) => { - const response = await iracing.api.data.series.assets(); - return response.data; - } -); - -export const getSeries = createEndpoint( - "/data/series/get", - { method: "GET" }, - async ({ context: { iracing } }) => { - const response = await iracing.api.data.series.get(); - return response.data; - } -); - -export const pastSeasons = createEndpoint( - "/data/series/past_seasons", - { - method: "GET", - query: z.object({ - seriesId: z.number(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.series.pastSeasons(query); - return response.data; - } -); - -export const seasons = createEndpoint( - "/data/series/seasons", - { - method: "GET", - query: z.object({ - includeSeries: z.boolean().optional(), - seasonYear: z.number().optional(), - seasonQuarter: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.series.seasons(query); - return response.data; - } -); - -export const seasonList = createEndpoint( - "/data/series/season_list", - { - method: "GET", - query: z.object({ - includeSeries: z.boolean().optional(), - seasonYear: z.number().optional(), - seasonQuarter: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.series.seasonList(query); - return response.data; - } -); - -export const seasonSchedule = createEndpoint( - "/data/series/season_schedule", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.series.seasonSchedule(query); - return response.data; - } -); - -export const statsSeries = createEndpoint( - "/data/series/stats_series", - { method: "GET" }, - async ({ context: { iracing } }) => { - const response = await iracing.api.data.series.statsSeries(); - return response.data; - } -); diff --git a/examples/oauth-example/src/routes/iracing/data/stats.ts b/examples/oauth-example/src/routes/iracing/data/stats.ts deleted file mode 100644 index 0e8d3bd..0000000 --- a/examples/oauth-example/src/routes/iracing/data/stats.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { DivisionSchema } from "../schema"; -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const memberBests = createEndpoint( - "/data/stats/member_bests", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - carId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberBests(query); - return response.data; - } -); - -export const memberCareer = createEndpoint( - "/data/stats/member_career", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberCareer(query); - return response.data; - } -); - -export const memberDivision = createEndpoint( - "/data/stats/member_division", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - eventType: z.union([z.literal(4), z.literal(5)]), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberDivision(query); - return response.data; - } -); - -export const memberRecap = createEndpoint( - "/data/stats/member_recap", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - year: z.number().optional(), - season: z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberRecap(query); - return response.data; - } -); - -export const memberRecentRaces = createEndpoint( - "/data/stats/member_recent_races", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberRecentRaces(query); - return response.data; - } -); - -export const memberSummary = createEndpoint( - "/data/stats/member_summary", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberSummary(query); - return response.data; - } -); - -export const memberYearly = createEndpoint( - "/data/stats/member_yearly", - { - method: "GET", - query: z.object({ - customerId: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.memberYearly(query); - return response.data; - } -); - -export const seasonDriverStandings = createEndpoint( - "/data/stats/season_driver_standings", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - carClassId: z.number(), - raceWeekNumber: z.number().optional(), - division: DivisionSchema.optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.seasonDriverStandings(query); - return response.data; - } -); - -export const seasonSupersessionStandings = createEndpoint( - "/data/stats/season_supersession_standings", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - carClassId: z.number(), - raceWeekNumber: z.number().optional(), - division: DivisionSchema.optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = - await iracing.api.data.stats.seasonSupersessionStandings(query); - return response.data; - } -); - -export const seasonTeamStandings = createEndpoint( - "/data/stats/season_team_standings", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - carClassId: z.number(), - raceWeekNumber: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.seasonTeamStandings(query); - return response.data; - } -); - -export const seasonTimeTrialStandings = createEndpoint( - "/data/stats/season_time_trial_standings", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - carClassId: z.number(), - raceWeekNumber: z.number().optional(), - division: DivisionSchema.optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = - await iracing.api.data.stats.seasonTimeTrialStandings(query); - return response.data; - } -); - -export const seasonTimeTrialResults = createEndpoint( - "/data/stats/season_time_trial_results", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - carClassId: z.number(), - raceWeekNumber: z.number(), - division: DivisionSchema.optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.seasonTimeTrialResults(query); - return response.data; - } -); - -export const seasonQualifyResults = createEndpoint( - "/data/stats/season_qualify_results", - { - method: "GET", - query: z.object({ - seasonId: z.number(), - carClassId: z.number(), - raceWeekNumber: z.number(), - division: DivisionSchema.optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.seasonQualifyResults(query); - return response.data; - } -); - -export const worldRecords = createEndpoint( - "/data/stats/world_records", - { - method: "GET", - query: z.object({ - carId: z.number(), - trackId: z.number(), - seasonYear: z.number().optional(), - seasonQuarter: z.number().optional(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.stats.worldRecords(query); - return response.data; - } -); diff --git a/examples/oauth-example/src/routes/iracing/data/time-attack.ts b/examples/oauth-example/src/routes/iracing/data/time-attack.ts deleted file mode 100644 index 86c42ee..0000000 --- a/examples/oauth-example/src/routes/iracing/data/time-attack.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { createEndpoint } from "../utils"; -import { z } from "zod"; - -export const memberSeasonResults = createEndpoint( - "/data/time_attack/member_season_results", - { - method: "GET", - requireHeaders: true, - query: z.object({ - seasonId: z.number(), - }), - }, - async ({ context: { iracing }, query }) => { - const response = - await iracing.api.data.timeAttack.memberSeasonResults(query); - return response.data; - } -); diff --git a/examples/oauth-example/src/routes/iracing/schema.ts b/examples/oauth-example/src/routes/iracing/schema.ts deleted file mode 100644 index cca0dff..0000000 --- a/examples/oauth-example/src/routes/iracing/schema.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { z } from "zod"; - -export const DivisionSchema = z.union([ - z.literal(0), - z.literal(1), - z.literal(2), - z.literal(3), - z.literal(4), - z.literal(5), - z.literal(6), - z.literal(7), - z.literal(8), - z.literal(9), - z.literal(10), -]); - -export type Division = z.infer; - -export const CategoryIdEnum = { - Oval: 1, - Road: 2, - DirtOval: 3, - DirtRoad: 4, -} as const; - -export type CategoryIdKey = keyof typeof CategoryIdEnum; -export type CategoryIdValue = (typeof CategoryIdEnum)[CategoryIdKey]; - -export const CategoryIdKeySchema = z.enum( - Object.keys(CategoryIdEnum) as [CategoryIdKey, ...CategoryIdKey[]] -); - -export const CategoryIdValueSchema = z.union( - (Object.values(CategoryIdEnum) as readonly number[]).map((n) => - z.literal(n) - ) as [z.ZodLiteral, ...z.ZodLiteral[]] -); - -export const CategoryIdEnumSchema = z.enum(CategoryIdEnum); -export type CategoryId = z.infer; - -export const ChartTypeEnum = { - iRating: 1, - TTRating: 2, - LicenseRating: 3, -} as const; - -export type ChartTypeKey = keyof typeof ChartTypeEnum; -export type ChartTypeValue = (typeof ChartTypeEnum)[ChartTypeKey]; - -export const ChartTypeKeySchema = z.enum( - Object.keys(ChartTypeEnum) as [ChartTypeKey, ...ChartTypeKey[]] -); - -export const ChartTypeValueSchema = z.union( - (Object.values(ChartTypeEnum) as readonly number[]).map((n) => - z.literal(n) - ) as [z.ZodLiteral, ...z.ZodLiteral[]] -); diff --git a/examples/oauth-example/src/routes/iracing/utils.ts b/examples/oauth-example/src/routes/iracing/utils.ts deleted file mode 100644 index ed3ae82..0000000 --- a/examples/oauth-example/src/routes/iracing/utils.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { IRacingAPIClient } from "@iracing-data/api"; -import axios from "axios"; -import { - createEndpoint as createEndpointFn, - createMiddleware, -} from "better-call"; - -export const iracingClientMiddleware = createMiddleware(async (context) => { - const accessToken = - context.getHeader("X-IRACING-ACCESS-TOKEN") || - context.getCookie("iracing-token"); - - const network = axios.create({ - baseURL: "https://members-ng.iracing.com/", - }); - - network.interceptors.request.use((config) => { - /** - * Only sign requests if an access token is provided - */ - if (accessToken) { - config.headers.Authorization = `Bearer ${accessToken}`; - } - - return config; - }); - - const iracing = new IRacingAPIClient(network); - - return { - iracing, - }; -}); - -export const createEndpoint = createEndpointFn.create({ - use: [iracingClientMiddleware], -}); diff --git a/examples/oauth-example/src/routes/oauth.ts b/examples/oauth-example/src/routes/oauth.ts deleted file mode 100644 index 0d58d0d..0000000 --- a/examples/oauth-example/src/routes/oauth.ts +++ /dev/null @@ -1,164 +0,0 @@ -import client from "@/oauth-client"; -import { BASE_URL } from "@iracing-data/oauth-client"; -import { createEndpoint } from "better-call"; -import path from "path"; -import { z } from "zod"; - -// TODO: Add routes for session management - -export const oauthSignIn = createEndpoint( - "/login", - { - method: "GET", - }, - async (context) => { - const { url } = await client.authorize(); - return context.redirect(url.toString()); - } -); - -export const oauthCallback = createEndpoint( - "/oauth/iracing/callback", - { - method: "GET", - query: z.object({ - code: z.string(), - state: z.string(), - }), - }, - async (context) => { - const token = await client.callback(new URLSearchParams(context.query)); - - /** - * TODO: Write some sort of handler at the top-level that consumers can provide to process the token - * before redirecting. - */ - context.setCookie("iracing-token", token.access_token, { - httpOnly: true, - path: "/", - maxAge: token.expires_in, - }); - - context.setHeader("X-IRACING-ACCESS-TOKEN", token.access_token); - context.setHeader( - "X-IRACING-ACCESS-TOKEN-EXPIRES-IN", - token.expires_in.toString() - ); - - if (token.scope) { - context.setHeader("X-IRACING-SCOPE", token.scope); - } - - if (token.refresh_token) { - context.setHeader("X-IRACING-REFRESH-TOKEN", token.refresh_token); - } - - if (token.refresh_token_expires_in) { - context.setHeader( - "X-IRACING-REFRESH-TOKEN-EXPIRES-IN", - token.refresh_token_expires_in.toString() - ); - } - - return context.redirect("/"); - } -); - -export const oauthSignOut = createEndpoint( - "/logout", - { - method: "GET", - }, - async (context) => { - context.setCookie("iracing-token", "", { - httpOnly: true, - path: "/", - maxAge: 0, - }); - - return context.redirect("/"); - } -); - -export const oauthSessions = createEndpoint( - "/oauth/sessions", - { - method: "GET", - }, - async (context) => { - const accessToken = - context.getHeader("X-IRACING-ACCESS-TOKEN") || - context.getCookie("iracing-token"); - - return fetch(path.join(BASE_URL, "sessions"), { - headers: { - Authorization: accessToken ? `Bearer ${accessToken}` : undefined, - }, - }); - } -); - -export const revokeCurrentOauthSession = createEndpoint( - "/oauth/revoke/current", - { - method: "POST", - body: z.object({ - forgetBrowser: z.boolean().optional(), - }), - }, - async (context) => { - const accessToken = - context.getHeader("X-IRACING-ACCESS-TOKEN") || - context.getCookie("iracing-token"); - - return fetch(path.join(BASE_URL, "revoke", "current"), { - body: JSON.stringify(context.body), - headers: { - Authorization: accessToken ? `Bearer ${accessToken}` : undefined, - "Content-Type": "application/x-www-form-urlencoded", - }, - }); - } -); - -export const revokeOauthSessions = createEndpoint( - "/oauth/revoke/current", - { - method: "POST", - body: z.object({ - sessionIds: z.array(z.string()), - }), - }, - async (context) => { - const accessToken = - context.getHeader("X-IRACING-ACCESS-TOKEN") || - context.getCookie("iracing-token"); - - return fetch(path.join(BASE_URL, "revoke", "current"), { - body: JSON.stringify({ session_ids: context.body.sessionIds.join(",") }), - headers: { - Authorization: accessToken ? `Bearer ${accessToken}` : undefined, - "Content-Type": "application/x-www-form-urlencoded", - }, - }); - } -); - -export const revokeClientOauthSessions = createEndpoint( - "/oauth/revoke/client", - { - method: "POST", - }, - async (context) => { - const accessToken = - context.getHeader("X-IRACING-ACCESS-TOKEN") || - context.getCookie("iracing-token"); - - return fetch(path.join(BASE_URL, "revoke", "client"), { - headers: { - Authorization: accessToken ? `Bearer ${accessToken}` : undefined, - "Content-Type": "application/x-www-form-urlencoded", - }, - }); - } -); diff --git a/openapi/iracing-oauth.json b/openapi/iracing-oauth.json new file mode 100644 index 0000000..793f8bf --- /dev/null +++ b/openapi/iracing-oauth.json @@ -0,0 +1 @@ +{"openapi":"3.1.1","info":{"title":"iRacing OAuth API","version":"0.0.1"},"servers":[{"url":"https://oauth.iracing.com/oauth2","description":"iRacing OAuth server."}],"externalDocs":{"url":"/book"},"paths":{"/iracing/profile":{"get":{"operationId":"getProfile","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"iracing_name":{"type":"string"},"iracing_cust_id":{"type":"number"}},"required":["iracing_name","iracing_cust_id"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/sessions":{"get":{"operationId":"getSessions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"session_id":{"description":"A session identifier. This value is considered opaque and its format may change without warning at our discretion.","type":"string"},"client_id":{"description":"A client identifier.","type":"string"},"client_name":{"description":"The name of the client as selected during client registration.","type":"string"},"client_developer_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_developer_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_developer_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope_descriptions":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_session":{"type":"boolean"},"impersonated":{"type":"boolean"},"impersonation_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}]},"first_continent":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_country":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_subdivisions":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_city":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_operating_system":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_browser":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}]},"last_continent":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_country":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_subdivisions":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_city":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_operating_system":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_browser":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["session_id","client_id","client_name","client_developer_name","client_developer_url","client_developer_email","scope","scope_descriptions","current_session","impersonated","impersonation_note","first_ip","first_continent","first_country","first_subdivisions","first_city","first_user_agent_header","first_user_agent_operating_system","first_user_agent_browser","last_ip","last_continent","last_country","last_subdivisions","last_city","last_user_agent_header","last_user_agent_operating_system","last_user_agent_browser"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/current":{"post":{"operationId":"revokeCurrent","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"forgetBrowser":{"type":"boolean"}}}}}},"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/sessions":{"post":{"operationId":"revokeSessions","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"sessionIds":{"type":"array","items":{"type":"string"}}},"required":["sessionIds"]}}}},"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/client":{"post":{"operationId":"revokeClient","security":[{"bearerAuth":[]}],"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/authorize":{"get":{"operationId":"authorize","parameters":[{"in":"query","name":"client_id","schema":{"description":"The client identifier issued during client registration.","type":"string"},"required":true,"description":"The client identifier issued during client registration."},{"in":"query","name":"redirect_uri","schema":{"description":"A redirect URI registered to the client, which must match exactly.","type":"string","format":"uri"},"required":true,"description":"A redirect URI registered to the client, which must match exactly."},{"in":"query","name":"response_type","schema":{"description":"The only valid value for this is code.","type":"string","const":"code"},"required":true,"description":"The only valid value for this is code."},{"in":"query","name":"code_challenge","schema":{"description":"A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless.","type":"string"},"description":"A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless."},{"in":"query","name":"code_challenge_method","schema":{"description":"The PKCE code challenge method. Either S256 (recommended) or plain.","default":"plain","anyOf":[{"type":"string","const":"plain"},{"type":"string","const":"S256"}]},"description":"The PKCE code challenge method. Either S256 (recommended) or plain."},{"in":"query","name":"state","schema":{"description":"This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks.","type":"string"},"description":"This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks."},{"in":"query","name":"scope","schema":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},{"in":"query","name":"prompt","schema":{"description":"Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user.","type":"string"},"description":"Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user."}],"responses":{"302":{"description":"Redirect back to the provided redirect_uri"}}}},"/token":{"post":{"operationId":"exchangeToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/tokenGrantParameters"}}}},"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenGrantResponse"}}}},"400":{"description":"Failure","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"status_reason":{"type":"string"},"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"required":["status","status_reason","error","error_description","error_uri"],"additionalProperties":false}}}}}}}},"components":{"schemas":{"tokenGrantParameters":{"oneOf":[{"$ref":"#/components/schemas/authorizationCodeGrant"},{"$ref":"#/components/schemas/refreshTokenGrant"},{"$ref":"#/components/schemas/passwordLimitedGrant"}],"type":"object","discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"#/components/schemas/authorizationCodeGrant","refresh_token":"#/components/schemas/refreshTokenGrant","password_limited":"#/components/schemas/passwordLimitedGrant"}}},"authorizationCodeGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"authorization_code"},"client_id":{"description":"The client identifier issued during client registration.","type":"string"},"client_secret":{"description":"The client secret issued during registration.","type":"string"},"code":{"description":"As returned to the redirect_uri of the client.","type":"string"},"redirect_uri":{"description":"The same redirect_uri used to `/authorize`.","type":"string"},"code_verifier":{"description":"The PKCE code verifier which is only required if a code_challenge was used to `/authorize``.","type":"string"}},"required":["grant_type","client_id","code","redirect_uri"]},"refreshTokenGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"refresh_token"},"client_id":{"description":"The client identifier issued during client registration.","type":"string"},"client_secret":{"description":"The client secret issued during registration.","type":"string"},"refresh_token":{"description":"As returned in the `/token` response.","type":"string"}},"required":["grant_type","client_id","refresh_token"]},"passwordLimitedGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"password_limited"},"client_id":{"description":"The client identifier issued during client registration.","type":"string"},"client_secret":{"description":"The client secret issued during registration.","type":"string"},"username":{"description":"The email address or other issued identifier for a user.","type":"string"},"password":{"description":"The password of the user. Password must be masked with the `username` before it is sent to the server.","type":"string"},"scope":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},"required":["grant_type","client_id","client_secret","username","password"]},"tokenGrantResponse":{"type":"object","properties":{"access_token":{"description":"The access token may be used to authorize a connection to a resource server. The value is considered opaque and its format may change without warning at our discretion.","type":"string"},"token_type":{"type":"string","const":"bearer"},"expires_in":{"description":"The number of seconds after which this access token will no longer be considered valid.","type":"number"},"refresh_token":{"description":"The refresh token may be used in a Refresh Token Grant to obtain new access and refresh tokens. Each refresh token may only be used once. The value is considered opaque and its format may change without warning at our discretion.","type":"string"},"refresh_token_expires_in":{"description":"The number of seconds after which this refresh token will no longer be considered valid. The server may not issue a refresh token, in which case this field will be omitted.","type":"number"},"scope":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},"required":["access_token","token_type","expires_in"],"additionalProperties":false}},"headers":{"x-request-id":{"required":true,"description":"Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.","schema":{"title":"Request ID","description":"Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.","type":"string"}}},"responses":{"SessionsRevoked":{"description":"Session(s) were successfully revoked.","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}}},"Unauthorized":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"status_reason":{"type":"string"},"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"required":["status","status_reason","error","error_description","error_uri"],"additionalProperties":false}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication"}}}} \ No newline at end of file diff --git a/openapi/iracing.json b/openapi/iracing.json new file mode 100644 index 0000000..d3ce662 --- /dev/null +++ b/openapi/iracing.json @@ -0,0 +1 @@ +{"openapi":"3.1.1","info":{"title":"iRacing `/data` API","version":"0.0.1"},"servers":[{"url":"https://members-ng.iracing.com/"}],"externalDocs":{"url":"/data/doc","description":"Find more information on available services here. Requires authentication."},"security":[{"bearerAuth":[]}],"tags":[{"name":"auth","description":"Auth endpoint."},{"name":"doc","description":"A documentation endpoint."},{"name":"car","description":"Car service endpoint."},{"name":"carclass","description":"Car class service endpoint."},{"name":"constants","description":"Constants service endpoint."},{"name":"driver_stats","description":"Driver stats service endpoint."},{"name":"hosted","description":"Hosted service endpoint."},{"name":"league","description":"League service endpoint"},{"name":"lookup","description":"Lookup endpoints for static reference data (countries, licenses, drivers, etc.)"},{"name":"member","description":"Member profile and related endpoints (profile, awards, participation credits)."},{"name":"results","description":"Race and session result endpoints (lap data, event logs, season results)."},{"name":"season","description":"Season-related endpoints (season lists, race guides, schedules)."},{"name":"series","description":"Series endpoints (series metadata, seasons, assets)."},{"name":"stats","description":"Statistical endpoints and summaries for members and seasons."},{"name":"team","description":"Team endpoints (team details, membership)."},{"name":"time_attack","description":"Time attack specific endpoints and member season results."},{"name":"track","description":"Track metadata and asset endpoints."}],"paths":{"/auth":{"post":{"operationId":"postAuth","tags":["auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string"}},"required":["email","password"]}}}},"responses":{}}},"/data/doc":{"get":{"operationId":"getDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/Docs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/carclass":{"get":{"operationId":"getCarClassDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/carclass/get":{"get":{"operationId":"getCarClassGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car":{"get":{"operationId":"getCarDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car/assets":{"get":{"operationId":"getCarAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car/get":{"get":{"operationId":"getCarGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants":{"get":{"operationId":"getConstantsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/categories":{"get":{"operationId":"getConstantsCategoriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/divisions":{"get":{"operationId":"getConstantsDivisionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/event_types":{"get":{"operationId":"getConstantsEventTypesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/driver_stats_by_category":{"get":{"operationId":"getDriverStatsByCategoryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/driver_stats_by_category/{category}":{"get":{"operationId":"getDriverStatsByCategoryCategoryDocs","tags":["doc"],"parameters":[{"in":"path","name":"category","schema":{"$ref":"#/components/schemas/iracingCategory"},"required":true,"description":"Racing category."}],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted":{"get":{"operationId":"getHostedDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted/combined_sessions":{"get":{"operationId":"getHostedCombinedSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted/sessions":{"get":{"operationId":"getHostedSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league":{"get":{"operationId":"getLeagueDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/cust_league_sessions":{"get":{"operationId":"getLeagueCustomerLeagueSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/directory":{"get":{"operationId":"getLeagueDirectoryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/get":{"get":{"operationId":"getLeagueGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/get_points_systems":{"get":{"operationId":"getLeagueGetPointsSystemsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/membership":{"get":{"operationId":"getLeagueMembershipDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/roster":{"get":{"operationId":"getLeagueRosterDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/seasons":{"get":{"operationId":"getLeagueSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/season_standings":{"get":{"operationId":"getLeagueSeasonStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/season_sessions":{"get":{"operationId":"getLeagueSeasonSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup":{"get":{"operationId":"getLookupDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/countries":{"get":{"operationId":"getLookupCountriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/drivers":{"get":{"operationId":"getLookupDriversDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/flairs":{"get":{"operationId":"getLookupFlairsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/get":{"get":{"operationId":"getLookupGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/licenses":{"get":{"operationId":"getLookupLicensesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member":{"get":{"operationId":"getMemberDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/awards":{"get":{"operationId":"getMemberAwardsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/award_instances":{"get":{"operationId":"getMemberAwardInstancesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/chart_data":{"get":{"operationId":"getMemberChartDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/get":{"get":{"operationId":"getMemberGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/info":{"get":{"operationId":"getMemberInfoDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/participation_credits":{"get":{"operationId":"getMemberParticipationCreditsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/profile":{"get":{"operationId":"getMemberProfileDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results":{"get":{"operationId":"getResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/get":{"get":{"operationId":"getResultsGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/event_log":{"get":{"operationId":"getResultsEventLogDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/lap_chart_data":{"get":{"operationId":"getResultsLapChartDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/lap_data":{"get":{"operationId":"getResultsLapDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/search_hosted":{"get":{"operationId":"getResultsSearchHostedDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/search_series":{"get":{"operationId":"getResultsSearchSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/season_results":{"get":{"operationId":"getResultsSeasonResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season":{"get":{"operationId":"getSeasonDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/list":{"get":{"operationId":"getSeasonListDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/race_guide":{"get":{"operationId":"getSeasonRaceGuideDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/spectator_subsessionids":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/spectator_subsessionids_detail":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDetailDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series":{"get":{"operationId":"getSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/assets":{"get":{"operationId":"getSeriesAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/get":{"get":{"operationId":"getSeriesGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/past_seasons":{"get":{"operationId":"getSeriesPastSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/seasons":{"get":{"operationId":"getSeriesSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/season_list":{"get":{"operationId":"getSeriesSeasonListDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/season_schedule":{"get":{"operationId":"getSeriesSeasonScheduleDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/stats_series":{"get":{"operationId":"getSeriesStatsSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats":{"get":{"operationId":"getStatsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_bests":{"get":{"operationId":"getStatsMemberBestsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_career":{"get":{"operationId":"getStatsMemberCareerDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_division":{"get":{"operationId":"getStatsMemberDivisionDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_recap":{"get":{"operationId":"getStatsMemberRecapDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_recent_races":{"get":{"operationId":"getStatsMemberRecentRacesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_summary":{"get":{"operationId":"getStatsMemberSummaryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_yearly":{"get":{"operationId":"getStatsMemberYearlyDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_driver_standings":{"get":{"operationId":"getStatsSeasonDriverStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_supersession_standings":{"get":{"operationId":"getStatsSeasonSupersessionStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_team_standings":{"get":{"operationId":"getStatsSeasonTeamStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_tt_standings":{"get":{"operationId":"getStatsSeasonTTStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_tt_results":{"get":{"operationId":"getStatsSeasonTTResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_qualify_results":{"get":{"operationId":"getStatsSeasonQualifyResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/world_records":{"get":{"operationId":"getStatsWorldRecordsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team":{"get":{"operationId":"getTeamDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team/get":{"get":{"operationId":"getTeamGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team/membership":{"get":{"operationId":"getTeamMembershipDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/time_attack":{"get":{"operationId":"getTimeAttackDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/time_attack/member_season_results":{"get":{"operationId":"getTimeAttackMemberSeasonResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track":{"get":{"operationId":"getTrackDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track/assets":{"get":{"operationId":"getTrackAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track/get":{"get":{"operationId":"getTrackGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/carclass/get":{"get":{"operationId":"getCarClass","summary":"Gets car classes.","tags":["carclass"],"externalDocs":{"url":"/data/doc/carclass/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/car/assets":{"get":{"operationId":"getCarAssets","description":"image paths are relative to https://images-static.iracing.com/","tags":["car"],"externalDocs":{"url":"/data/doc/car/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/car/get":{"get":{"operationId":"getCar","tags":["car"],"externalDocs":{"url":"/data/doc/car/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/categories":{"get":{"operationId":"getConstantsCategories","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/categories"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/divisions":{"get":{"operationId":"getConstantsDivisions","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/divisions"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/event_types":{"get":{"operationId":"getConstantsEventTypes","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/event_types"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/driver_stats_by_category/{category}":{"get":{"operationId":"getDriverStatsByCategory","tags":["driver_stats"],"externalDocs":{"url":"/data/doc/driver_stats_by_category/{category}"},"parameters":[{"in":"path","name":"category","schema":{"$ref":"#/components/schemas/iracingCategory"},"required":true,"description":"Racing category."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/hosted/combined_sessions":{"get":{"operationId":"getHostedCombinedSessions","description":"Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user.","tags":["hosted"],"externalDocs":{"url":"/data/doc/hosted/combined_sessions"},"parameters":[{"in":"query","name":"package_id","schema":{"description":"If set, return only sessions using this car or track package ID.","type":"number"},"description":"If set, return only sessions using this car or track package ID."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/hosted/sessions":{"get":{"operationId":"getHostedSessions","description":"Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user.","tags":["hosted"],"externalDocs":{"url":"/data/doc/hosted/sessions"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/cust_league_sessions":{"get":{"operationId":"getLeagueCustomerLeagueSessions","tags":["league"],"externalDocs":{"url":"/data/doc/league/cust_league_sessions"},"parameters":[{"in":"query","name":"mine","schema":{"description":"If true, return only sessions created by this user.","type":"boolean"},"description":"If true, return only sessions created by this user."},{"in":"query","name":"package_id","schema":{"description":"If set, return only sessions using this car or track package ID.","type":"number"},"description":"If set, return only sessions using this car or track package ID."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/directory":{"get":{"operationId":"getLeagueDirectory","tags":["league"],"externalDocs":{"url":"/data/doc/league/directory"},"parameters":[{"in":"query","name":"search","schema":{"description":"Will search against league name, description, owner, and league ID.","type":"string"},"description":"Will search against league name, description, owner, and league ID."},{"in":"query","name":"tag","schema":{"description":"One or more tags, comma-separated.","type":"string"},"description":"One or more tags, comma-separated."},{"in":"query","name":"restrict_to_member","schema":{"description":"If true include only leagues for which customer is a member.","type":"boolean"},"description":"If true include only leagues for which customer is a member."},{"in":"query","name":"restrict_to_recruiting","schema":{"description":"If true include only leagues which are recruiting.","type":"boolean"},"description":"If true include only leagues which are recruiting."},{"in":"query","name":"restrict_to_friends","schema":{"description":"If true include only leagues owned by a friend.","type":"boolean"},"description":"If true include only leagues owned by a friend."},{"in":"query","name":"restrict_to_watched","schema":{"description":"If true include only leagues owned by a watched member.","type":"boolean"},"description":"If true include only leagues owned by a watched member."},{"in":"query","name":"minimum_roster_count","schema":{"description":"If set include leagues with at least this number of members.","type":"number"},"description":"If set include leagues with at least this number of members."},{"in":"query","name":"maximum_roster_count","schema":{"description":"If set include leagues with no more than this number of members.","type":"number"},"description":"If set include leagues with no more than this number of members."},{"in":"query","name":"lowerbound","schema":{"description":"First row of results to return. Defaults to 1.","type":"number"},"description":"First row of results to return. Defaults to 1."},{"in":"query","name":"upperbound","schema":{"description":"Last row of results to return. Defaults to lowerbound + 39.","type":"number"},"description":"Last row of results to return. Defaults to lowerbound + 39."},{"in":"query","name":"sort","schema":{"description":"One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance.","type":"string"},"description":"One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance."},{"in":"query","name":"order","schema":{"description":"One of asc or desc. Defaults to asc.","type":"string"},"description":"One of asc or desc. Defaults to asc."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/get":{"get":{"operationId":"getLeague","tags":["league"],"externalDocs":{"url":"/data/doc/league/get"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/get_points_systems":{"get":{"operationId":"getLeaguePointsSystems","tags":["league"],"externalDocs":{"url":"/data/doc/league/get_points_systems"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"description":"If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned.","type":"number"},"description":"If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/membership":{"get":{"operationId":"getLeagueMembership","tags":["league"],"externalDocs":{"url":"/data/doc/league/membership"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned.","$ref":"#/components/schemas/customerId"},"description":"If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned."},{"in":"query","name":"include_league","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/roster":{"get":{"operationId":"getLeagueRoster","tags":["league"],"externalDocs":{"url":"/data/doc/league/roster"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/seasons":{"get":{"operationId":"getLeagueSeasons","tags":["league"],"externalDocs":{"url":"/data/doc/league/seasons"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"retired","schema":{"description":"If true include seasons which are no longer active.","type":"boolean"},"description":"If true include seasons which are no longer active."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/season_standings":{"get":{"operationId":"getLeagueSeasonStandings","tags":["league"],"externalDocs":{"url":"/data/doc/league/season_standings"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"}},{"in":"query","name":"car_id","schema":{"description":"If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes.","type":"number"},"description":"If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/season_sessions":{"get":{"operationId":"getLeagueSeasonSessions","tags":["league"],"externalDocs":{"url":"/data/doc/league/season_sessions"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"results_only","schema":{"description":"If true include only sessions for which results are available.","type":"boolean"},"description":"If true include only sessions for which results are available."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/countries":{"get":{"operationId":"getLookupCountries","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/countries"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/flairs":{"get":{"operationId":"getLookupFlairs","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/flairs"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/licenses":{"get":{"operationId":"getLookupLicenses","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/licenses"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/drivers":{"get":{"operationId":"getLookupDrivers","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/drivers"},"parameters":[{"in":"query","name":"search_term","schema":{"description":"A cust_id or partial name for which to search.","type":"string"},"required":true,"description":"A cust_id or partial name for which to search."},{"in":"query","name":"league_id","schema":{"description":"Narrow the search to the roster of the given league.","type":"number"},"description":"Narrow the search to the roster of the given league."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/get":{"get":{"operationId":"getLookup","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/awards":{"get":{"operationId":"getMemberAwards","tags":["member"],"externalDocs":{"url":"/data/doc/member/awards"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/award_instances":{"get":{"operationId":"getMemberAwardInstances","tags":["member"],"externalDocs":{"url":"/data/doc/member/award_instances"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"award_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/chart_data":{"get":{"operationId":"getMemberChartData","tags":["member"],"externalDocs":{"url":"/data/doc/member/chart_data"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"category_id","schema":{"description":"1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road","type":"number"},"required":true,"description":"1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road"},{"in":"query","name":"chart_type","schema":{"description":"1 - iRating; 2 - TT Rating; 3 - License/SR","type":"number"},"required":true,"description":"1 - iRating; 2 - TT Rating; 3 - License/SR"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/get":{"get":{"operationId":"getMember","tags":["member"],"externalDocs":{"url":"/data/doc/member/get"},"parameters":[{"in":"query","name":"cust_ids","schema":{"description":"Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"required":true,"description":"Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4"},{"in":"query","name":"include_licenses","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/info":{"get":{"operationId":"getMemberInfo","tags":["member"],"externalDocs":{"url":"/data/doc/member/info"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/participation_credits":{"get":{"operationId":"getMemberParticipationCredits","tags":["member"],"externalDocs":{"url":"/data/doc/member/participation_credits"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/profile":{"get":{"operationId":"getMemberProfile","summary":"Gets a requested user's profile.","tags":["member"],"externalDocs":{"url":"/data/doc/member/profile"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/get":{"get":{"operationId":"getResults","tags":["results"],"externalDocs":{"url":"/data/doc/results/get"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/event_log":{"get":{"operationId":"getResultsEventLog","tags":["results"],"externalDocs":{"url":"/data/doc/results/event_log"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"description":"The main event is 0; the preceding event is -1, and so on.","type":"number"},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/lap_chart_data":{"get":{"operationId":"getResultsLapChartData","tags":["results"],"externalDocs":{"url":"/data/doc/results/lap_chart_data"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"description":"The main event is 0; the preceding event is -1, and so on.","type":"number"},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/lap_data":{"get":{"operationId":"getResultsLapData","tags":["results"],"externalDocs":{"url":"/data/doc/results/lap_data"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"description":"The main event is 0; the preceding event is -1, and so on.","type":"number"},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."},{"in":"query","name":"cust_id","schema":{"description":"Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included.","$ref":"#/components/schemas/customerId"},"description":"Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included."},{"in":"query","name":"team_id","schema":{"description":"Required if the subsession was a team event.","type":"number"},"description":"Required if the subsession was a team event."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/search_hosted":{"get":{"operationId":"getResultsSearchHosted","tags":["results"],"externalDocs":{"url":"/data/doc/results/search_hosted"},"parameters":[{"in":"query","name":"start_range_begin","schema":{"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"start_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past."},{"in":"query","name":"finish_range_begin","schema":{"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"finish_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past."},{"in":"query","name":"cust_id","schema":{"description":"The participant's customer ID. Ignored if team_id is supplied.","$ref":"#/components/schemas/customerId"},"description":"The participant's customer ID. Ignored if team_id is supplied."},{"in":"query","name":"team_id","schema":{"description":"The team ID to search for. Takes priority over cust_id if both are supplied.","type":"number"},"description":"The team ID to search for. Takes priority over cust_id if both are supplied."},{"in":"query","name":"host_cust_id","schema":{"description":"The host's customer ID.","$ref":"#/components/schemas/customerId"},"description":"The host's customer ID."},{"in":"query","name":"session_name","schema":{"description":"Part or all of the session's name.","type":"string"},"description":"Part or all of the session's name."},{"in":"query","name":"league_id","schema":{"description":"Include only results for the league with this ID.","type":"number"},"description":"Include only results for the league with this ID."},{"in":"query","name":"league_season_id","schema":{"description":"Include only results for the league season with this ID.","type":"number"},"description":"Include only results for the league season with this ID."},{"in":"query","name":"car_id","schema":{"description":"One of the cars used by the session.","type":"number"},"description":"One of the cars used by the session."},{"in":"query","name":"track_id","schema":{"description":"The ID of the track used by the session.","type":"number"},"description":"The ID of the track used by the session."},{"in":"query","name":"category_ids","schema":{"description":"Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/search_series":{"get":{"operationId":"getResultsSearchSeries","tags":["results"],"externalDocs":{"url":"/data/doc/results/search_series"},"parameters":[{"in":"query","name":"season_year","schema":{"description":"Required when using season_quarter.","type":"number"},"description":"Required when using season_quarter."},{"in":"query","name":"season_quarter","schema":{"description":"Required when using season_year.","type":"number"},"description":"Required when using season_year."},{"in":"query","name":"start_range_begin","schema":{"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"start_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past."},{"in":"query","name":"finish_range_begin","schema":{"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"finish_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past."},{"in":"query","name":"cust_id","schema":{"description":"Include only sessions in which this customer participated. Ignored if team_id is supplied.","$ref":"#/components/schemas/customerId"},"description":"Include only sessions in which this customer participated. Ignored if team_id is supplied."},{"in":"query","name":"team_id","schema":{"description":"Include only sessions in which this team participated. Takes priority over cust_id if both are supplied.","type":"number"},"description":"Include only sessions in which this team participated. Takes priority over cust_id if both are supplied."},{"in":"query","name":"series_id","schema":{"description":"Include only sessions for series with this ID.","type":"number"},"description":"Include only sessions for series with this ID."},{"in":"query","name":"race_week_num","schema":{"description":"Include only sessions with this race week number.","type":"number"},"description":"Include only sessions with this race week number."},{"in":"query","name":"official_only","schema":{"description":"If true, include only sessions earning championship points. Defaults to all.","type":"boolean"},"description":"If true, include only sessions earning championship points. Defaults to all."},{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"},{"in":"query","name":"category_ids","schema":{"description":"License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/season_results":{"get":{"operationId":"getResultsSeasonResults","tags":["results"],"externalDocs":{"url":"/data/doc/results/season_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"event_type","schema":{"description":"Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race","$ref":"#/components/schemas/iracingEventType"},"description":"Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race"},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/list":{"get":{"operationId":"getSeasonList","tags":["season"],"externalDocs":{"url":"/data/doc/season/list"},"parameters":[{"in":"query","name":"season_year","schema":{"type":"number"},"required":true},{"in":"query","name":"season_quarter","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/race_guide":{"get":{"operationId":"getSeasonRaceGuide","tags":["season"],"externalDocs":{"url":"/data/doc/season/race_guide"},"parameters":[{"in":"query","name":"from","schema":{"description":"ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time."},{"in":"query","name":"include_end_after_from","schema":{"description":"Include sessions which start before 'from' but end after.","type":"boolean"},"description":"Include sessions which start before 'from' but end after."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/spectator_subsessionids":{"get":{"operationId":"getSeasonSpectatorSubsessionIds","tags":["season"],"externalDocs":{"url":"/data/doc/season/spectator_subsessionids"},"parameters":[{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"array","items":{"$ref":"#/components/schemas/iracingEventType"}},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/spectator_subsessionids_detail":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDetail","tags":["season"],"externalDocs":{"url":"/data/doc/season/spectator_subsessionids_detail"},"parameters":[{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"array","items":{"$ref":"#/components/schemas/iracingEventType"}},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"},{"in":"query","name":"season_ids","schema":{"description":"Seasons to include in the search. Defaults to all. ?season_ids=513,937","type":"array","items":{"type":"number"}},"description":"Seasons to include in the search. Defaults to all. ?season_ids=513,937"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/assets":{"get":{"operationId":"getSeriesAssets","tags":["series"],"externalDocs":{"url":"/data/doc/series/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/get":{"get":{"operationId":"getSeries","tags":["series"],"externalDocs":{"url":"/data/doc/series/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/past_seasons":{"get":{"operationId":"getSeriesPastSeasons","tags":["series"],"externalDocs":{"url":"/data/doc/series/past_seasons"},"parameters":[{"in":"query","name":"series_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/seasons":{"get":{"operationId":"getSeriesSeasons","tags":["series"],"externalDocs":{"url":"/data/doc/series/seasons"},"parameters":[{"in":"query","name":"include_series","schema":{"type":"boolean"}},{"in":"query","name":"season_year","schema":{"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.","type":"number"},"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned."},{"in":"query","name":"season_quarter","schema":{"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.","type":"number"},"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/season_list":{"get":{"operationId":"getSeriesSeasonList","tags":["series"],"externalDocs":{"url":"/data/doc/series/season_list"},"parameters":[{"in":"query","name":"include_series","schema":{"type":"boolean"}},{"in":"query","name":"season_year","schema":{"type":"number"}},{"in":"query","name":"season_quarter","schema":{"type":"number"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/season_schedule":{"get":{"operationId":"getSeriesSeasonSchedule","tags":["series"],"externalDocs":{"url":"/data/doc/series/season_schedule"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/stats_series":{"get":{"operationId":"getSeriesStatsSeries","tags":["series"],"externalDocs":{"url":"/data/doc/series/stats_series"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_bests":{"get":{"operationId":"getStatsMemberBests","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_bests"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"car_id","schema":{"description":"First call should exclude car_id; use cars_driven list in return for subsequent calls.","type":"number"},"description":"First call should exclude car_id; use cars_driven list in return for subsequent calls."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_career":{"get":{"operationId":"getStatsMemberCareer","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_career"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_division":{"get":{"operationId":"getStatsMemberDivision","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_division"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"event_type","schema":{"description":"The event type code for the division type: 4 - Time Trial; 5 - Race","anyOf":[{"description":"Time trial","type":"number","const":4},{"description":"Race","type":"number","const":5}]},"required":true,"description":"The event type code for the division type: 4 - Time Trial; 5 - Race"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_recap":{"get":{"operationId":"getStatsMemberRecap","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_recap"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"year","schema":{"description":"Season year; if not supplied the current calendar year (UTC) is used.","anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"description":"Season year; if not supplied the current calendar year (UTC) is used."},{"in":"query","name":"season","schema":{"description":"Season (quarter) within the year; if not supplied the recap will be for the entire year.","type":"number"},"description":"Season (quarter) within the year; if not supplied the recap will be for the entire year."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_recent_races":{"get":{"operationId":"getStatsMemberRecentRaces","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_recent_races"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_summary":{"get":{"operationId":"getStatsMemberSummary","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_summary"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_yearly":{"get":{"operationId":"getStatsMemberYearly","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_yearly"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_driver_standings":{"get":{"operationId":"getStatsSeasonDriverStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_driver_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_supersession_standings":{"get":{"operationId":"getStatsSeasonSupersessionStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_supersession_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_team_standings":{"get":{"operationId":"getStatsSeasonTeamStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_team_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_time_trial_standings":{"get":{"operationId":"getStatsSeasonTimeTrialStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_time_trial_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_time_trial_results":{"get":{"operationId":"getStatsSeasonTimeTrialResults","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_time_trial_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"required":true,"description":"The first race week of a season is 0."},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_qualify_results":{"get":{"operationId":"getStatsSeasonQualifyResults","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_qualify_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"required":true,"description":"The first race week of a season is 0."},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/world_records":{"get":{"operationId":"getStatsWorldRecords","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/world_records"},"parameters":[{"in":"query","name":"car_id","schema":{"type":"number"},"required":true},{"in":"query","name":"track_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_year","schema":{"description":"Limit best times to a given year.","type":"number"},"description":"Limit best times to a given year."},{"in":"query","name":"season_quarter","schema":{"description":"Limit best times to a given quarter; only applicable when year is used.","type":"number"},"description":"Limit best times to a given quarter; only applicable when year is used."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/team/get":{"get":{"operationId":"getTeam","tags":["team"],"externalDocs":{"url":"/data/doc/team/get"},"parameters":[{"in":"query","name":"team_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/team/membership":{"get":{"operationId":"getTeamMembership","tags":["team"],"externalDocs":{"url":"/data/doc/team/membership"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/time_attack/member_season_results":{"get":{"operationId":"getTimeAttackMemberSeasonResults","tags":["time_attack"],"externalDocs":{"url":"/data/doc/time_attack/member_season_results"},"parameters":[{"in":"query","name":"ta_comp_season_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/track/assets":{"get":{"operationId":"getTrackAssets","tags":["track"],"externalDocs":{"url":"/data/doc/track/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/track/get":{"get":{"operationId":"getTrack","tags":["track"],"externalDocs":{"url":"/data/doc/track/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}}},"components":{"schemas":{"iracingCategory":{"description":"Racing category.","anyOf":[{"description":"Oval discipline","type":"string","const":"oval"},{"description":"Road discipline. Legacy, use `sports_car` or `formula_car` instead.","type":"string","const":"road"},{"description":"Dirt road discipline.","type":"string","const":"dirt_road"},{"description":"Dirt oval discipline.","type":"string","const":"dirt_oval"},{"description":"Sports car discipline.","type":"string","const":"sports_car"},{"description":"Formula car discipline.","type":"string","const":"formula_car"}]},"customerId":{"description":"Numeric ID of a customer on iRacing.","type":"number"},"iracingEventType":{"description":"iRacing Event Type","anyOf":[{"description":"Practice","type":"number","const":2},{"description":"Qualifying","type":"number","const":3},{"description":"Time trial","type":"number","const":4},{"description":"Race","type":"number","const":5}]},"iracingDivision":{"description":"iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information.","anyOf":[{"description":"Division 1","type":"number","const":0},{"description":"Division 2","type":"number","const":1},{"description":"Division 3","type":"number","const":2},{"description":"Division 4","type":"number","const":3},{"description":"Division 5","type":"number","const":4},{"description":"Division 6","type":"number","const":5},{"description":"Division 7","type":"number","const":6},{"description":"Division 8","type":"number","const":7},{"description":"Division 9","type":"number","const":8},{"description":"Division 10","type":"number","const":9},{"description":"Rookie","type":"number","const":10}]},"iracingAPIResponse":{"description":"Response from iRacing `/data` API.","type":"object","properties":{"link":{"description":"A link to the cached data","type":"string","format":"uri"},"expires":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["link","expires"],"additionalProperties":false},"iracingServicesDocs":{"description":"An index of available services on the iRacing API.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceDocs"}},"iracingServiceDocs":{"description":"An index of service methods available for the requested service.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceMethodDocs"}},"iracingServiceMethodDocs":{"description":"An iRacing API Service Method object.","type":"object","properties":{"link":{"type":"string","format":"uri"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceMethodParametersDocs"}},"expirationSeconds":{"type":"number"}},"required":["link","parameters"],"additionalProperties":false},"iracingServiceMethodParametersDocs":{"description":"An iRacing API Service Method Parameters object.","type":"object","properties":{"type":{"type":"string"},"note":{"type":"string"},"required":{"type":"boolean"}},"required":["type"],"additionalProperties":false},"errorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"note":{"type":"string"}},"required":["error"],"additionalProperties":false}},"headers":{"x-ratelimit-limit":{"required":true,"description":"The current total rate limit.","schema":{"title":"Rate limit limit","description":"The current total rate limit.","type":"number"}},"x-ratelimit-remaining":{"required":true,"description":"How much of the rate limit you have remaining.","schema":{"title":"Rate limit remaining","description":"How much of the rate limit you have remaining.","type":"number"}},"x-ratelimit-reset":{"required":true,"description":"When the rate limit will reset in epoch timestamp.","schema":{"title":"Rate limit reset","description":"When the rate limit will reset in epoch timestamp.","type":"string"}}},"responses":{"Success":{"description":"Success","headers":{"x-ratelimit-limit":{"$ref":"#/components/headers/x-ratelimit-limit"},"x-ratelimit-remaining":{"$ref":"#/components/headers/x-ratelimit-remaining"},"x-ratelimit-reset":{"$ref":"#/components/headers/x-ratelimit-reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingAPIResponse"}}}},"Docs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServicesDocs"}}}},"ServiceDocs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServiceDocs"}}}},"ServiceMethodDocs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServiceMethodDocs"}}}},"RateLimited":{"description":"Rate limited","headers":{"x-ratelimit-limit":{"$ref":"#/components/headers/x-ratelimit-limit"},"x-ratelimit-remaining":{"$ref":"#/components/headers/x-ratelimit-remaining"},"x-ratelimit-reset":{"$ref":"#/components/headers/x-ratelimit-reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}},"Maintenance":{"description":"Maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}},"Unauthorized":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication"},"oAuth2":{"type":"oauth2","description":"OAuth service for obtaining a JWT. For more information, see https://oauth.iracing.com/oauth2/book/introduction.html","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.iracing.com/oauth2/authorize","tokenUrl":"https://oauth.iracing.com/oauth2/token","scopes":{"iracing.auth":"Authorization for iRacing services.","iracing.profile":"Access to the iRacing profile."}}}}}}} \ No newline at end of file diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 0000000..f052220 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.17.0" + } +} diff --git a/package.json b/package.json index 93ac7a8..e729dcf 100644 --- a/package.json +++ b/package.json @@ -4,26 +4,38 @@ "description": "", "main": "index.js", "scripts": { + "build": "pnpm --recursive --stream build", + "codegen": "pnpm codegen:openapi && pnpm codegen:client", + "codegen:openapi": "pnpm -w --parallel --stream '/^codegen:openapi:.+$/'", + "codegen:openapi:api": "iracing-api-openapi -o ./openapi -f iracing.json", + "codegen:openapi:oauth": "iracing-oauth-api-openapi -o ./openapi -f iracing-oauth.json", + "codegen:client": "pnpm -w --parallel --stream '/^codegen:client:api:.+$/'", + "codegen:client:api": "pnpm -w --parallel --stream '/^codegen:client:api:.+$/'", + "codegen:client:api:axios": "openapi-generator-cli generate -g typescript-axios -i openapi/iracing.json -o packages/api/client/axios --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case',npmName='@iracing-data/api-client-axios'", + "codegen:client:api:fetch": "openapi-generator-cli generate -g typescript-fetch -i openapi/iracing.json -o packages/api/client/fetch --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case',npmName='@iracing-data/api-client-fetch'", + "dev:pkg": "pnpm --recursive --parallel --stream dev", + "dev:tsc": "tsc --build tsconfig.json --watch", + "dev": "NODE_ENV=development pnpm --stream '/^dev:.+$/'", + "format": "pnpm lint:fix && pnpm style:fix", "lint:fix": "pnpm lint --fix", "lint": "eslint . --ext .ts,.js", "style:fix": "prettier --write .", - "style": "prettier --check .", - "format": "pnpm lint:fix && pnpm style:fix", - "build": "pnpm --recursive --stream build", - "dev": "NODE_ENV=development pnpm --stream '/^dev:.+$/'", - "dev:tsc": "tsc --build tsconfig.json --watch", - "dev:pkg": "pnpm --recursive --parallel --stream dev" + "style": "prettier --check ." }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { + "@iracing-data/api-schema-to-openapi": "workspace:*", + "@iracing-data/oauth-schema-to-openapi": "workspace:*", + "@openapitools/openapi-generator-cli": "^2.25.0", "@types/google-protobuf": "^3.15.12", "@types/lodash": "^4.17.15", "@types/node": "^24", "@typescript-eslint/eslint-plugin": "8.24.1", "@typescript-eslint/parser": "8.22.0", "dotenv": "16.4.7", + "esbuild": "^0.27.0", "eslint": "^9", "eslint-config-prettier": "10.1.8", "eslint-plugin-import": "^2.31.0", @@ -36,7 +48,10 @@ "typescript": "^5.9.2" }, "workspaces": [ + "apps/*", "packages/*", + "packages/api/*", + "packages/api/client/*", "packages/events/*", "packages/helpers/*", "packages/oauth/*" diff --git a/packages/api/.npmignore b/packages/api/.npmignore deleted file mode 100644 index d3c0529..0000000 --- a/packages/api/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -src/ -doc/ -tsconfig.build.json -tsconfig.build.tsbuildinfo -tsconfig.json diff --git a/packages/api/README.md b/packages/api/README.md deleted file mode 100644 index 49124bf..0000000 --- a/packages/api/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# @iracing-data/api - -An implementation for the iRacing `/data` API. Written in TypeScript, powered by Axios. - -## Installation - -_Coming Soon_ - -## Usage - -_Coming Soon_ - -## Contributing - -### Adding new API endpoints - -[docs](./src/api/README.md) - -### Adding implementation to the client - -Add the new route to the client, defined in the `src/` root: - -```typescript -export class IRacingAPIClient { - // ... existing implementation - - // Add the new route for easy access for consumers - async newResourceEndpoint() { - // Execute the network request - const response = await this.api.data.new.resourceEndpoint(); - - // !!!: Error handling if appropriate - // In most cases, this is irrelevant, but if you want to provide - // some context to the error, you can do so here. - if (response.status !== 200) { - throw new Error(`Failed to fetch data: ${response.status}`); - } - - // Use the helper function the fetch the JSON from the provided link - return fetchValidLinkData(response.data); - } - - // Or, if your endpoint takes parameters... - async newResourceEndpointWithParameters( - input: Parameters[0] // Typescript annotation to forward the parameters from the function definition - ) { - const response = await this.api.data.new.resourceEndpoint(input); - - // ...same as above - } - -} -``` \ No newline at end of file diff --git a/packages/api/client/axios/.gitignore b/packages/api/client/axios/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/packages/api/client/axios/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/api/client/axios/.npmignore b/packages/api/client/axios/.npmignore new file mode 100644 index 0000000..999d88d --- /dev/null +++ b/packages/api/client/axios/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/api/client/axios/.openapi-generator-ignore b/packages/api/client/axios/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/packages/api/client/axios/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/api/client/axios/.openapi-generator/FILES b/packages/api/client/axios/.openapi-generator/FILES new file mode 100644 index 0000000..76b0144 --- /dev/null +++ b/packages/api/client/axios/.openapi-generator/FILES @@ -0,0 +1,36 @@ +.gitignore +.npmignore +README.md +api.ts +base.ts +common.ts +configuration.ts +docs/AuthApi.md +docs/CarApi.md +docs/CarclassApi.md +docs/ConstantsApi.md +docs/DocApi.md +docs/DriverStatsApi.md +docs/ErrorResponse.md +docs/HostedApi.md +docs/IracingAPIResponse.md +docs/IracingCategory.md +docs/IracingDivision.md +docs/IracingEventType.md +docs/IracingServiceMethodDocs.md +docs/IracingServiceMethodParametersDocs.md +docs/LeagueApi.md +docs/LookupApi.md +docs/MemberApi.md +docs/PostAuthRequest.md +docs/ResultsApi.md +docs/SeasonApi.md +docs/SeriesApi.md +docs/StatsApi.md +docs/TeamApi.md +docs/TimeAttackApi.md +docs/TrackApi.md +git_push.sh +index.ts +package.json +tsconfig.json diff --git a/packages/api/client/axios/.openapi-generator/VERSION b/packages/api/client/axios/.openapi-generator/VERSION new file mode 100644 index 0000000..6328c54 --- /dev/null +++ b/packages/api/client/axios/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0 diff --git a/packages/api/client/axios/README.md b/packages/api/client/axios/README.md new file mode 100644 index 0000000..8698ac5 --- /dev/null +++ b/packages/api/client/axios/README.md @@ -0,0 +1,238 @@ +## @iracing-data/api-client-axios@0.0.1 + +This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments: + +Environment +* Node.js +* Webpack +* Browserify + +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 + +Module system +* CommonJS +* ES6 module system + +It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) + +### Building + +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build +``` + +### Publishing + +First build the package then run `npm publish` + +### Consuming + +navigate to the folder of your consuming project and run one of the following commands. + +_published:_ + +``` +npm install @iracing-data/api-client-axios@0.0.1 --save +``` + +_unPublished (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE --save +``` + +### Documentation for API Endpoints + +All URIs are relative to *https://members-ng.iracing.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthApi* | [**postAuth**](docs/AuthApi.md#postauth) | **POST** /auth | +*CarApi* | [**getCar**](docs/CarApi.md#getcar) | **GET** /data/car/get | +*CarApi* | [**getCarAssets**](docs/CarApi.md#getcarassets) | **GET** /data/car/assets | +*CarclassApi* | [**getCarClass**](docs/CarclassApi.md#getcarclass) | **GET** /data/carclass/get | Gets car classes. +*ConstantsApi* | [**getConstantsCategories**](docs/ConstantsApi.md#getconstantscategories) | **GET** /data/constants/categories | +*ConstantsApi* | [**getConstantsDivisions**](docs/ConstantsApi.md#getconstantsdivisions) | **GET** /data/constants/divisions | +*ConstantsApi* | [**getConstantsEventTypes**](docs/ConstantsApi.md#getconstantseventtypes) | **GET** /data/constants/event_types | +*DocApi* | [**getCarAssetsDocs**](docs/DocApi.md#getcarassetsdocs) | **GET** /data/doc/car/assets | +*DocApi* | [**getCarClassDocs**](docs/DocApi.md#getcarclassdocs) | **GET** /data/doc/carclass | +*DocApi* | [**getCarClassGetDocs**](docs/DocApi.md#getcarclassgetdocs) | **GET** /data/doc/carclass/get | +*DocApi* | [**getCarDocs**](docs/DocApi.md#getcardocs) | **GET** /data/doc/car | +*DocApi* | [**getCarGetDocs**](docs/DocApi.md#getcargetdocs) | **GET** /data/doc/car/get | +*DocApi* | [**getConstantsCategoriesDocs**](docs/DocApi.md#getconstantscategoriesdocs) | **GET** /data/doc/constants/categories | +*DocApi* | [**getConstantsDivisionsDocs**](docs/DocApi.md#getconstantsdivisionsdocs) | **GET** /data/doc/constants/divisions | +*DocApi* | [**getConstantsDocs**](docs/DocApi.md#getconstantsdocs) | **GET** /data/doc/constants | +*DocApi* | [**getConstantsEventTypesDocs**](docs/DocApi.md#getconstantseventtypesdocs) | **GET** /data/doc/constants/event_types | +*DocApi* | [**getDocs**](docs/DocApi.md#getdocs) | **GET** /data/doc | +*DocApi* | [**getDriverStatsByCategoryCategoryDocs**](docs/DocApi.md#getdriverstatsbycategorycategorydocs) | **GET** /data/doc/driver_stats_by_category/{category} | +*DocApi* | [**getDriverStatsByCategoryDocs**](docs/DocApi.md#getdriverstatsbycategorydocs) | **GET** /data/doc/driver_stats_by_category | +*DocApi* | [**getHostedCombinedSessionsDocs**](docs/DocApi.md#gethostedcombinedsessionsdocs) | **GET** /data/doc/hosted/combined_sessions | +*DocApi* | [**getHostedDocs**](docs/DocApi.md#gethosteddocs) | **GET** /data/doc/hosted | +*DocApi* | [**getHostedSessionsDocs**](docs/DocApi.md#gethostedsessionsdocs) | **GET** /data/doc/hosted/sessions | +*DocApi* | [**getLeagueCustomerLeagueSessionsDocs**](docs/DocApi.md#getleaguecustomerleaguesessionsdocs) | **GET** /data/doc/league/cust_league_sessions | +*DocApi* | [**getLeagueDirectoryDocs**](docs/DocApi.md#getleaguedirectorydocs) | **GET** /data/doc/league/directory | +*DocApi* | [**getLeagueDocs**](docs/DocApi.md#getleaguedocs) | **GET** /data/doc/league | +*DocApi* | [**getLeagueGetDocs**](docs/DocApi.md#getleaguegetdocs) | **GET** /data/doc/league/get | +*DocApi* | [**getLeagueGetPointsSystemsDocs**](docs/DocApi.md#getleaguegetpointssystemsdocs) | **GET** /data/doc/league/get_points_systems | +*DocApi* | [**getLeagueMembershipDocs**](docs/DocApi.md#getleaguemembershipdocs) | **GET** /data/doc/league/membership | +*DocApi* | [**getLeagueRosterDocs**](docs/DocApi.md#getleaguerosterdocs) | **GET** /data/doc/league/roster | +*DocApi* | [**getLeagueSeasonSessionsDocs**](docs/DocApi.md#getleagueseasonsessionsdocs) | **GET** /data/doc/league/season_sessions | +*DocApi* | [**getLeagueSeasonStandingsDocs**](docs/DocApi.md#getleagueseasonstandingsdocs) | **GET** /data/doc/league/season_standings | +*DocApi* | [**getLeagueSeasonsDocs**](docs/DocApi.md#getleagueseasonsdocs) | **GET** /data/doc/league/seasons | +*DocApi* | [**getLookupCountriesDocs**](docs/DocApi.md#getlookupcountriesdocs) | **GET** /data/doc/lookup/countries | +*DocApi* | [**getLookupDocs**](docs/DocApi.md#getlookupdocs) | **GET** /data/doc/lookup | +*DocApi* | [**getLookupDriversDocs**](docs/DocApi.md#getlookupdriversdocs) | **GET** /data/doc/lookup/drivers | +*DocApi* | [**getLookupFlairsDocs**](docs/DocApi.md#getlookupflairsdocs) | **GET** /data/doc/lookup/flairs | +*DocApi* | [**getLookupGetDocs**](docs/DocApi.md#getlookupgetdocs) | **GET** /data/doc/lookup/get | +*DocApi* | [**getLookupLicensesDocs**](docs/DocApi.md#getlookuplicensesdocs) | **GET** /data/doc/lookup/licenses | +*DocApi* | [**getMemberAwardInstancesDocs**](docs/DocApi.md#getmemberawardinstancesdocs) | **GET** /data/doc/member/award_instances | +*DocApi* | [**getMemberAwardsDocs**](docs/DocApi.md#getmemberawardsdocs) | **GET** /data/doc/member/awards | +*DocApi* | [**getMemberChartDataDocs**](docs/DocApi.md#getmemberchartdatadocs) | **GET** /data/doc/member/chart_data | +*DocApi* | [**getMemberDocs**](docs/DocApi.md#getmemberdocs) | **GET** /data/doc/member | +*DocApi* | [**getMemberGetDocs**](docs/DocApi.md#getmembergetdocs) | **GET** /data/doc/member/get | +*DocApi* | [**getMemberInfoDocs**](docs/DocApi.md#getmemberinfodocs) | **GET** /data/doc/member/info | +*DocApi* | [**getMemberParticipationCreditsDocs**](docs/DocApi.md#getmemberparticipationcreditsdocs) | **GET** /data/doc/member/participation_credits | +*DocApi* | [**getMemberProfileDocs**](docs/DocApi.md#getmemberprofiledocs) | **GET** /data/doc/member/profile | +*DocApi* | [**getResultsDocs**](docs/DocApi.md#getresultsdocs) | **GET** /data/doc/results | +*DocApi* | [**getResultsEventLogDocs**](docs/DocApi.md#getresultseventlogdocs) | **GET** /data/doc/results/event_log | +*DocApi* | [**getResultsGetDocs**](docs/DocApi.md#getresultsgetdocs) | **GET** /data/doc/results/get | +*DocApi* | [**getResultsLapChartDataDocs**](docs/DocApi.md#getresultslapchartdatadocs) | **GET** /data/doc/results/lap_chart_data | +*DocApi* | [**getResultsLapDataDocs**](docs/DocApi.md#getresultslapdatadocs) | **GET** /data/doc/results/lap_data | +*DocApi* | [**getResultsSearchHostedDocs**](docs/DocApi.md#getresultssearchhosteddocs) | **GET** /data/doc/results/search_hosted | +*DocApi* | [**getResultsSearchSeriesDocs**](docs/DocApi.md#getresultssearchseriesdocs) | **GET** /data/doc/results/search_series | +*DocApi* | [**getResultsSeasonResultsDocs**](docs/DocApi.md#getresultsseasonresultsdocs) | **GET** /data/doc/results/season_results | +*DocApi* | [**getSeasonDocs**](docs/DocApi.md#getseasondocs) | **GET** /data/doc/season | +*DocApi* | [**getSeasonListDocs**](docs/DocApi.md#getseasonlistdocs) | **GET** /data/doc/season/list | +*DocApi* | [**getSeasonRaceGuideDocs**](docs/DocApi.md#getseasonraceguidedocs) | **GET** /data/doc/season/race_guide | +*DocApi* | [**getSeasonSpectatorSubsessionIdsDetailDocs**](docs/DocApi.md#getseasonspectatorsubsessionidsdetaildocs) | **GET** /data/doc/season/spectator_subsessionids_detail | +*DocApi* | [**getSeasonSpectatorSubsessionIdsDocs**](docs/DocApi.md#getseasonspectatorsubsessionidsdocs) | **GET** /data/doc/season/spectator_subsessionids | +*DocApi* | [**getSeriesAssetsDocs**](docs/DocApi.md#getseriesassetsdocs) | **GET** /data/doc/series/assets | +*DocApi* | [**getSeriesDocs**](docs/DocApi.md#getseriesdocs) | **GET** /data/doc/series | +*DocApi* | [**getSeriesGetDocs**](docs/DocApi.md#getseriesgetdocs) | **GET** /data/doc/series/get | +*DocApi* | [**getSeriesPastSeasonsDocs**](docs/DocApi.md#getseriespastseasonsdocs) | **GET** /data/doc/series/past_seasons | +*DocApi* | [**getSeriesSeasonListDocs**](docs/DocApi.md#getseriesseasonlistdocs) | **GET** /data/doc/series/season_list | +*DocApi* | [**getSeriesSeasonScheduleDocs**](docs/DocApi.md#getseriesseasonscheduledocs) | **GET** /data/doc/series/season_schedule | +*DocApi* | [**getSeriesSeasonsDocs**](docs/DocApi.md#getseriesseasonsdocs) | **GET** /data/doc/series/seasons | +*DocApi* | [**getSeriesStatsSeriesDocs**](docs/DocApi.md#getseriesstatsseriesdocs) | **GET** /data/doc/series/stats_series | +*DocApi* | [**getStatsDocs**](docs/DocApi.md#getstatsdocs) | **GET** /data/doc/stats | +*DocApi* | [**getStatsMemberBestsDocs**](docs/DocApi.md#getstatsmemberbestsdocs) | **GET** /data/doc/stats/member_bests | +*DocApi* | [**getStatsMemberCareerDocs**](docs/DocApi.md#getstatsmembercareerdocs) | **GET** /data/doc/stats/member_career | +*DocApi* | [**getStatsMemberDivisionDocs**](docs/DocApi.md#getstatsmemberdivisiondocs) | **GET** /data/doc/stats/member_division | +*DocApi* | [**getStatsMemberRecapDocs**](docs/DocApi.md#getstatsmemberrecapdocs) | **GET** /data/doc/stats/member_recap | +*DocApi* | [**getStatsMemberRecentRacesDocs**](docs/DocApi.md#getstatsmemberrecentracesdocs) | **GET** /data/doc/stats/member_recent_races | +*DocApi* | [**getStatsMemberSummaryDocs**](docs/DocApi.md#getstatsmembersummarydocs) | **GET** /data/doc/stats/member_summary | +*DocApi* | [**getStatsMemberYearlyDocs**](docs/DocApi.md#getstatsmemberyearlydocs) | **GET** /data/doc/stats/member_yearly | +*DocApi* | [**getStatsSeasonDriverStandingsDocs**](docs/DocApi.md#getstatsseasondriverstandingsdocs) | **GET** /data/doc/stats/season_driver_standings | +*DocApi* | [**getStatsSeasonQualifyResultsDocs**](docs/DocApi.md#getstatsseasonqualifyresultsdocs) | **GET** /data/doc/stats/season_qualify_results | +*DocApi* | [**getStatsSeasonSupersessionStandingsDocs**](docs/DocApi.md#getstatsseasonsupersessionstandingsdocs) | **GET** /data/doc/stats/season_supersession_standings | +*DocApi* | [**getStatsSeasonTTResultsDocs**](docs/DocApi.md#getstatsseasonttresultsdocs) | **GET** /data/doc/stats/season_tt_results | +*DocApi* | [**getStatsSeasonTTStandingsDocs**](docs/DocApi.md#getstatsseasonttstandingsdocs) | **GET** /data/doc/stats/season_tt_standings | +*DocApi* | [**getStatsSeasonTeamStandingsDocs**](docs/DocApi.md#getstatsseasonteamstandingsdocs) | **GET** /data/doc/stats/season_team_standings | +*DocApi* | [**getStatsWorldRecordsDocs**](docs/DocApi.md#getstatsworldrecordsdocs) | **GET** /data/doc/stats/world_records | +*DocApi* | [**getTeamDocs**](docs/DocApi.md#getteamdocs) | **GET** /data/doc/team | +*DocApi* | [**getTeamGetDocs**](docs/DocApi.md#getteamgetdocs) | **GET** /data/doc/team/get | +*DocApi* | [**getTeamMembershipDocs**](docs/DocApi.md#getteammembershipdocs) | **GET** /data/doc/team/membership | +*DocApi* | [**getTimeAttackDocs**](docs/DocApi.md#gettimeattackdocs) | **GET** /data/doc/time_attack | +*DocApi* | [**getTimeAttackMemberSeasonResultsDocs**](docs/DocApi.md#gettimeattackmemberseasonresultsdocs) | **GET** /data/doc/time_attack/member_season_results | +*DocApi* | [**getTrackAssetsDocs**](docs/DocApi.md#gettrackassetsdocs) | **GET** /data/doc/track/assets | +*DocApi* | [**getTrackDocs**](docs/DocApi.md#gettrackdocs) | **GET** /data/doc/track | +*DocApi* | [**getTrackGetDocs**](docs/DocApi.md#gettrackgetdocs) | **GET** /data/doc/track/get | +*DriverStatsApi* | [**getDriverStatsByCategory**](docs/DriverStatsApi.md#getdriverstatsbycategory) | **GET** /data/driver_stats_by_category/{category} | +*HostedApi* | [**getHostedCombinedSessions**](docs/HostedApi.md#gethostedcombinedsessions) | **GET** /data/hosted/combined_sessions | +*HostedApi* | [**getHostedSessions**](docs/HostedApi.md#gethostedsessions) | **GET** /data/hosted/sessions | +*LeagueApi* | [**getLeague**](docs/LeagueApi.md#getleague) | **GET** /data/league/get | +*LeagueApi* | [**getLeagueCustomerLeagueSessions**](docs/LeagueApi.md#getleaguecustomerleaguesessions) | **GET** /data/league/cust_league_sessions | +*LeagueApi* | [**getLeagueDirectory**](docs/LeagueApi.md#getleaguedirectory) | **GET** /data/league/directory | +*LeagueApi* | [**getLeagueMembership**](docs/LeagueApi.md#getleaguemembership) | **GET** /data/league/membership | +*LeagueApi* | [**getLeaguePointsSystems**](docs/LeagueApi.md#getleaguepointssystems) | **GET** /data/league/get_points_systems | +*LeagueApi* | [**getLeagueRoster**](docs/LeagueApi.md#getleagueroster) | **GET** /data/league/roster | +*LeagueApi* | [**getLeagueSeasonSessions**](docs/LeagueApi.md#getleagueseasonsessions) | **GET** /data/league/season_sessions | +*LeagueApi* | [**getLeagueSeasonStandings**](docs/LeagueApi.md#getleagueseasonstandings) | **GET** /data/league/season_standings | +*LeagueApi* | [**getLeagueSeasons**](docs/LeagueApi.md#getleagueseasons) | **GET** /data/league/seasons | +*LookupApi* | [**getLookup**](docs/LookupApi.md#getlookup) | **GET** /data/lookup/get | +*LookupApi* | [**getLookupCountries**](docs/LookupApi.md#getlookupcountries) | **GET** /data/lookup/countries | +*LookupApi* | [**getLookupDrivers**](docs/LookupApi.md#getlookupdrivers) | **GET** /data/lookup/drivers | +*LookupApi* | [**getLookupFlairs**](docs/LookupApi.md#getlookupflairs) | **GET** /data/lookup/flairs | +*LookupApi* | [**getLookupLicenses**](docs/LookupApi.md#getlookuplicenses) | **GET** /data/lookup/licenses | +*MemberApi* | [**getMember**](docs/MemberApi.md#getmember) | **GET** /data/member/get | +*MemberApi* | [**getMemberAwardInstances**](docs/MemberApi.md#getmemberawardinstances) | **GET** /data/member/award_instances | +*MemberApi* | [**getMemberAwards**](docs/MemberApi.md#getmemberawards) | **GET** /data/member/awards | +*MemberApi* | [**getMemberChartData**](docs/MemberApi.md#getmemberchartdata) | **GET** /data/member/chart_data | +*MemberApi* | [**getMemberInfo**](docs/MemberApi.md#getmemberinfo) | **GET** /data/member/info | +*MemberApi* | [**getMemberParticipationCredits**](docs/MemberApi.md#getmemberparticipationcredits) | **GET** /data/member/participation_credits | +*MemberApi* | [**getMemberProfile**](docs/MemberApi.md#getmemberprofile) | **GET** /data/member/profile | Gets a requested user\'s profile. +*ResultsApi* | [**getResults**](docs/ResultsApi.md#getresults) | **GET** /data/results/get | +*ResultsApi* | [**getResultsEventLog**](docs/ResultsApi.md#getresultseventlog) | **GET** /data/results/event_log | +*ResultsApi* | [**getResultsLapChartData**](docs/ResultsApi.md#getresultslapchartdata) | **GET** /data/results/lap_chart_data | +*ResultsApi* | [**getResultsLapData**](docs/ResultsApi.md#getresultslapdata) | **GET** /data/results/lap_data | +*ResultsApi* | [**getResultsSearchHosted**](docs/ResultsApi.md#getresultssearchhosted) | **GET** /data/results/search_hosted | +*ResultsApi* | [**getResultsSearchSeries**](docs/ResultsApi.md#getresultssearchseries) | **GET** /data/results/search_series | +*ResultsApi* | [**getResultsSeasonResults**](docs/ResultsApi.md#getresultsseasonresults) | **GET** /data/results/season_results | +*SeasonApi* | [**getSeasonList**](docs/SeasonApi.md#getseasonlist) | **GET** /data/season/list | +*SeasonApi* | [**getSeasonRaceGuide**](docs/SeasonApi.md#getseasonraceguide) | **GET** /data/season/race_guide | +*SeasonApi* | [**getSeasonSpectatorSubsessionIds**](docs/SeasonApi.md#getseasonspectatorsubsessionids) | **GET** /data/season/spectator_subsessionids | +*SeasonApi* | [**getSeasonSpectatorSubsessionIdsDetail**](docs/SeasonApi.md#getseasonspectatorsubsessionidsdetail) | **GET** /data/season/spectator_subsessionids_detail | +*SeriesApi* | [**getSeries**](docs/SeriesApi.md#getseries) | **GET** /data/series/get | +*SeriesApi* | [**getSeriesAssets**](docs/SeriesApi.md#getseriesassets) | **GET** /data/series/assets | +*SeriesApi* | [**getSeriesPastSeasons**](docs/SeriesApi.md#getseriespastseasons) | **GET** /data/series/past_seasons | +*SeriesApi* | [**getSeriesSeasonList**](docs/SeriesApi.md#getseriesseasonlist) | **GET** /data/series/season_list | +*SeriesApi* | [**getSeriesSeasonSchedule**](docs/SeriesApi.md#getseriesseasonschedule) | **GET** /data/series/season_schedule | +*SeriesApi* | [**getSeriesSeasons**](docs/SeriesApi.md#getseriesseasons) | **GET** /data/series/seasons | +*SeriesApi* | [**getSeriesStatsSeries**](docs/SeriesApi.md#getseriesstatsseries) | **GET** /data/series/stats_series | +*StatsApi* | [**getStatsMemberBests**](docs/StatsApi.md#getstatsmemberbests) | **GET** /data/stats/member_bests | +*StatsApi* | [**getStatsMemberCareer**](docs/StatsApi.md#getstatsmembercareer) | **GET** /data/stats/member_career | +*StatsApi* | [**getStatsMemberDivision**](docs/StatsApi.md#getstatsmemberdivision) | **GET** /data/stats/member_division | +*StatsApi* | [**getStatsMemberRecap**](docs/StatsApi.md#getstatsmemberrecap) | **GET** /data/stats/member_recap | +*StatsApi* | [**getStatsMemberRecentRaces**](docs/StatsApi.md#getstatsmemberrecentraces) | **GET** /data/stats/member_recent_races | +*StatsApi* | [**getStatsMemberSummary**](docs/StatsApi.md#getstatsmembersummary) | **GET** /data/stats/member_summary | +*StatsApi* | [**getStatsMemberYearly**](docs/StatsApi.md#getstatsmemberyearly) | **GET** /data/stats/member_yearly | +*StatsApi* | [**getStatsSeasonDriverStandings**](docs/StatsApi.md#getstatsseasondriverstandings) | **GET** /data/stats/season_driver_standings | +*StatsApi* | [**getStatsSeasonQualifyResults**](docs/StatsApi.md#getstatsseasonqualifyresults) | **GET** /data/stats/season_qualify_results | +*StatsApi* | [**getStatsSeasonSupersessionStandings**](docs/StatsApi.md#getstatsseasonsupersessionstandings) | **GET** /data/stats/season_supersession_standings | +*StatsApi* | [**getStatsSeasonTeamStandings**](docs/StatsApi.md#getstatsseasonteamstandings) | **GET** /data/stats/season_team_standings | +*StatsApi* | [**getStatsSeasonTimeTrialResults**](docs/StatsApi.md#getstatsseasontimetrialresults) | **GET** /data/stats/season_time_trial_results | +*StatsApi* | [**getStatsSeasonTimeTrialStandings**](docs/StatsApi.md#getstatsseasontimetrialstandings) | **GET** /data/stats/season_time_trial_standings | +*StatsApi* | [**getStatsWorldRecords**](docs/StatsApi.md#getstatsworldrecords) | **GET** /data/stats/world_records | +*TeamApi* | [**getTeam**](docs/TeamApi.md#getteam) | **GET** /data/team/get | +*TeamApi* | [**getTeamMembership**](docs/TeamApi.md#getteammembership) | **GET** /data/team/membership | +*TimeAttackApi* | [**getTimeAttackMemberSeasonResults**](docs/TimeAttackApi.md#gettimeattackmemberseasonresults) | **GET** /data/time_attack/member_season_results | +*TrackApi* | [**getTrack**](docs/TrackApi.md#gettrack) | **GET** /data/track/get | +*TrackApi* | [**getTrackAssets**](docs/TrackApi.md#gettrackassets) | **GET** /data/track/assets | + + +### Documentation For Models + + - [ErrorResponse](docs/ErrorResponse.md) + - [IracingAPIResponse](docs/IracingAPIResponse.md) + - [IracingCategory](docs/IracingCategory.md) + - [IracingDivision](docs/IracingDivision.md) + - [IracingEventType](docs/IracingEventType.md) + - [IracingServiceMethodDocs](docs/IracingServiceMethodDocs.md) + - [IracingServiceMethodParametersDocs](docs/IracingServiceMethodParametersDocs.md) + - [PostAuthRequest](docs/PostAuthRequest.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### bearerAuth + +- **Type**: Bearer authentication (JWT) + + +### oAuth2 + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: https://oauth.iracing.com/oauth2/authorize +- **Scopes**: + - **iracing.auth**: Authorization for iRacing services. + - **iracing.profile**: Access to the iRacing profile. + diff --git a/packages/api/client/axios/api.ts b/packages/api/client/axios/api.ts new file mode 100644 index 0000000..2b29301 --- /dev/null +++ b/packages/api/client/axios/api.ts @@ -0,0 +1,11826 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +export interface ErrorResponse { + 'error': string; + 'message'?: string; + 'note'?: string; +} +/** + * Response from iRacing `/data` API. + */ +export interface IracingAPIResponse { + /** + * A link to the cached data + */ + 'link': string; + 'expires': string; +} +/** + * Racing category. + */ + +export const IracingCategory = { + /** + * Oval discipline + */ + Oval: 'oval', + /** + * Road discipline. Legacy, use `sports_car` or `formula_car` instead. + */ + Road: 'road', + /** + * Dirt road discipline. + */ + DirtRoad: 'dirt_road', + /** + * Dirt oval discipline. + */ + DirtOval: 'dirt_oval', + /** + * Sports car discipline. + */ + SportsCar: 'sports_car', + /** + * Formula car discipline. + */ + FormulaCar: 'formula_car' +} as const; + +export type IracingCategory = typeof IracingCategory[keyof typeof IracingCategory]; + + +/** + * iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. + */ + +export const IracingDivision = { + /** + * Division 1 + */ + NUMBER_0: 0, + /** + * Division 2 + */ + NUMBER_1: 1, + /** + * Division 3 + */ + NUMBER_2: 2, + /** + * Division 4 + */ + NUMBER_3: 3, + /** + * Division 5 + */ + NUMBER_4: 4, + /** + * Division 6 + */ + NUMBER_5: 5, + /** + * Division 7 + */ + NUMBER_6: 6, + /** + * Division 8 + */ + NUMBER_7: 7, + /** + * Division 9 + */ + NUMBER_8: 8, + /** + * Division 10 + */ + NUMBER_9: 9, + /** + * Rookie + */ + NUMBER_10: 10 +} as const; + +export type IracingDivision = typeof IracingDivision[keyof typeof IracingDivision]; + + +/** + * iRacing Event Type + */ + +export const IracingEventType = { + /** + * Practice + */ + NUMBER_2: 2, + /** + * Qualifying + */ + NUMBER_3: 3, + /** + * Time trial + */ + NUMBER_4: 4, + /** + * Race + */ + NUMBER_5: 5 +} as const; + +export type IracingEventType = typeof IracingEventType[keyof typeof IracingEventType]; + + +/** + * An iRacing API Service Method object. + */ +export interface IracingServiceMethodDocs { + 'link': string; + 'parameters': { [key: string]: IracingServiceMethodParametersDocs; }; + 'expirationSeconds'?: number; +} +/** + * An iRacing API Service Method Parameters object. + */ +export interface IracingServiceMethodParametersDocs { + 'type': string; + 'note'?: string; + 'required'?: boolean; +} +export interface PostAuthRequest { + 'email': string; + 'password': string; +} + +/** + * AuthApi - axios parameter creator + */ +export const AuthApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {PostAuthRequest} [post_auth_request] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postAuth: async (post_auth_request?: PostAuthRequest, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/auth`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(post_auth_request, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuthApi - functional programming interface + */ +export const AuthApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration) + return { + /** + * + * @param {PostAuthRequest} [post_auth_request] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postAuth(post_auth_request?: PostAuthRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.postAuth(post_auth_request, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.postAuth']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AuthApi - factory interface + */ +export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuthApiFp(configuration) + return { + /** + * + * @param {AuthApiPostAuthRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postAuth(requestParameters: AuthApiPostAuthRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.postAuth(requestParameters.post_auth_request, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for postAuth operation in AuthApi. + */ +export interface AuthApiPostAuthRequest { + readonly post_auth_request?: PostAuthRequest +} + +/** + * AuthApi - object-oriented interface + */ +export class AuthApi extends BaseAPI { + /** + * + * @param {AuthApiPostAuthRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public postAuth(requestParameters: AuthApiPostAuthRequest = {}, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).postAuth(requestParameters.post_auth_request, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * CarApi - axios parameter creator + */ +export const CarApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCar: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/car/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarAssets: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/car/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CarApi - functional programming interface + */ +export const CarApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CarApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCar(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCar(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CarApi.getCar']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarAssets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarAssets(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CarApi.getCarAssets']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * CarApi - factory interface + */ +export const CarApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CarApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCar(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCar(options).then((request) => request(axios, basePath)); + }, + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarAssets(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCarAssets(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CarApi - object-oriented interface + */ +export class CarApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCar(options?: RawAxiosRequestConfig) { + return CarApiFp(this.configuration).getCar(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarAssets(options?: RawAxiosRequestConfig) { + return CarApiFp(this.configuration).getCarAssets(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * CarclassApi - axios parameter creator + */ +export const CarclassApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClass: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/carclass/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CarclassApi - functional programming interface + */ +export const CarclassApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CarclassApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarClass(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarClass(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['CarclassApi.getCarClass']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * CarclassApi - factory interface + */ +export const CarclassApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CarclassApiFp(configuration) + return { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClass(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCarClass(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CarclassApi - object-oriented interface + */ +export class CarclassApi extends BaseAPI { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarClass(options?: RawAxiosRequestConfig) { + return CarclassApiFp(this.configuration).getCarClass(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ConstantsApi - axios parameter creator + */ +export const ConstantsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsCategories: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/constants/categories`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDivisions: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/constants/divisions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsEventTypes: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/constants/event_types`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ConstantsApi - functional programming interface + */ +export const ConstantsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ConstantsApiAxiosParamCreator(configuration) + return { + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsCategories(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsCategories(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ConstantsApi.getConstantsCategories']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsDivisions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsDivisions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ConstantsApi.getConstantsDivisions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsEventTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsEventTypes(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ConstantsApi.getConstantsEventTypes']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ConstantsApi - factory interface + */ +export const ConstantsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ConstantsApiFp(configuration) + return { + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsCategories(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getConstantsCategories(options).then((request) => request(axios, basePath)); + }, + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDivisions(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getConstantsDivisions(options).then((request) => request(axios, basePath)); + }, + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsEventTypes(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getConstantsEventTypes(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ConstantsApi - object-oriented interface + */ +export class ConstantsApi extends BaseAPI { + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsCategories(options?: RawAxiosRequestConfig) { + return ConstantsApiFp(this.configuration).getConstantsCategories(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsDivisions(options?: RawAxiosRequestConfig) { + return ConstantsApiFp(this.configuration).getConstantsDivisions(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsEventTypes(options?: RawAxiosRequestConfig) { + return ConstantsApiFp(this.configuration).getConstantsEventTypes(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DocApi - axios parameter creator + */ +export const DocApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarAssetsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/car/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClassDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/carclass`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClassGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/carclass/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/car`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/car/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsCategoriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/constants/categories`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDivisionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/constants/divisions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/constants`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsEventTypesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/constants/event_types`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategoryCategoryDocs: async (category: IracingCategory, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'category' is not null or undefined + assertParamExists('getDriverStatsByCategoryCategoryDocs', 'category', category) + const localVarPath = `/data/doc/driver_stats_by_category/{category}` + .replace(`{${"category"}}`, encodeURIComponent(String(category))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategoryDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/driver_stats_by_category`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/hosted/combined_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/hosted`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/hosted/sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/cust_league_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectoryDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/directory`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueGetPointsSystemsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/get_points_systems`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueMembershipDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRosterDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/roster`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/season_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/season_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/league/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupCountriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/lookup/countries`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/lookup`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDriversDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/lookup/drivers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupFlairsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/lookup/flairs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/lookup/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupLicensesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/lookup/licenses`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardInstancesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/award_instances`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/awards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberChartDataDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberInfoDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/info`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberParticipationCreditsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/participation_credits`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberProfileDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/member/profile`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsEventLogDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/event_log`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapChartDataDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/lap_chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapDataDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/lap_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchHostedDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/search_hosted`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchSeriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/search_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSeasonResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/results/season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/season`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonListDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/season/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonRaceGuideDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/season/race_guide`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDetailDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/season/spectator_subsessionids_detail`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/season/spectator_subsessionids`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesAssetsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesPastSeasonsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/past_seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonListDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/season_list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonScheduleDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/season_schedule`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/series/stats_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBestsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_bests`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareerDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_career`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivisionDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_division`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecapDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_recap`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRacesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_recent_races`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberSummaryDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_summary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberYearlyDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/member_yearly`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonDriverStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/season_driver_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonQualifyResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/season_qualify_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonSupersessionStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/season_supersession_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTTResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/season_tt_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTTStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/season_tt_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTeamStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/season_team_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsWorldRecordsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/stats/world_records`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/team`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/team/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamMembershipDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/team/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/time_attack`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/time_attack/member_season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackAssetsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/track/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/track`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/doc/track/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DocApi - functional programming interface + */ +export const DocApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DocApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarAssetsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarAssetsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getCarAssetsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarClassDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarClassDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getCarClassDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarClassGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarClassGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getCarClassGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getCarDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCarGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getCarGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsCategoriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsCategoriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsCategoriesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsDivisionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsDivisionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsDivisionsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConstantsEventTypesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsEventTypesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsEventTypesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDriverStatsByCategoryCategoryDocs(category: IracingCategory, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDriverStatsByCategoryCategoryDocs(category, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getDriverStatsByCategoryCategoryDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDriverStatsByCategoryDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getDriverStatsByCategoryDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedCombinedSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getHostedCombinedSessionsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getHostedDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getHostedSessionsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueCustomerLeagueSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueCustomerLeagueSessionsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueDirectoryDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueDirectoryDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueDirectoryDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueGetPointsSystemsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueGetPointsSystemsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueMembershipDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueMembershipDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueMembershipDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueRosterDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueRosterDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueRosterDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueSeasonSessionsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueSeasonStandingsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueSeasonsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupCountriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupCountriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupCountriesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupDriversDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupDriversDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupDriversDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupFlairsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupFlairsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupFlairsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupLicensesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupLicensesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupLicensesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwardInstancesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberAwardInstancesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwardsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwardsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberAwardsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberChartDataDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberChartDataDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberChartDataDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberInfoDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberInfoDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberInfoDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberParticipationCreditsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberParticipationCreditsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberProfileDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberProfileDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberProfileDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsEventLogDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsEventLogDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsEventLogDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapChartDataDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapChartDataDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsLapChartDataDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapDataDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapDataDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsLapDataDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchHostedDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchHostedDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsSearchHostedDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchSeriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsSearchSeriesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSeasonResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsSeasonResultsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonListDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonListDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonListDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonRaceGuideDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonRaceGuideDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonSpectatorSubsessionIdsDetailDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDetailDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonSpectatorSubsessionIdsDetailDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonSpectatorSubsessionIdsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesAssetsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesAssetsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesAssetsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesPastSeasonsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesPastSeasonsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonListDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonListDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesSeasonListDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonScheduleDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesSeasonScheduleDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesSeasonsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesStatsSeriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesStatsSeriesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberBestsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberBestsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberBestsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberCareerDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberCareerDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberCareerDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberDivisionDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberDivisionDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecapDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecapDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberRecapDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecentRacesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberRecentRacesDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberSummaryDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberSummaryDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberYearlyDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberYearlyDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonDriverStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonDriverStandingsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonQualifyResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonQualifyResultsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonSupersessionStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonSupersessionStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonSupersessionStandingsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTTResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonTTResultsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTTStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonTTStandingsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTeamStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonTeamStandingsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsWorldRecordsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsWorldRecordsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTeamDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTeamGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamMembershipDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamMembershipDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTeamMembershipDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTimeAttackDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeAttackDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTimeAttackDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeAttackMemberSeasonResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTimeAttackMemberSeasonResultsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackAssetsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackAssetsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTrackAssetsDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTrackDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DocApi.getTrackGetDocs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DocApi - factory interface + */ +export const DocApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DocApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarAssetsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCarAssetsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClassDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getCarClassDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClassGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCarClassGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getCarDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCarGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsCategoriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getConstantsCategoriesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDivisionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getConstantsDivisionsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getConstantsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsEventTypesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getConstantsEventTypesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }> { + return localVarFp.getDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {DocApiGetDriverStatsByCategoryCategoryDocsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategoryCategoryDocs(requestParameters: DocApiGetDriverStatsByCategoryCategoryDocsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDriverStatsByCategoryCategoryDocs(requestParameters.category, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getDriverStatsByCategoryDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getHostedCombinedSessionsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getHostedDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getHostedSessionsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueCustomerLeagueSessionsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectoryDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueDirectoryDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getLeagueDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueGetPointsSystemsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueMembershipDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueMembershipDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRosterDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueRosterDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueSeasonSessionsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueSeasonStandingsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueSeasonsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupCountriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupCountriesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getLookupDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDriversDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupDriversDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupFlairsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupFlairsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupLicensesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupLicensesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberAwardInstancesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberAwardsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberChartDataDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberChartDataDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getMemberDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberInfoDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberInfoDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberParticipationCreditsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberProfileDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberProfileDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getResultsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsEventLogDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsEventLogDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapChartDataDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsLapChartDataDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapDataDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsLapDataDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchHostedDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsSearchHostedDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsSearchSeriesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsSeasonResultsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getSeasonDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonListDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonListDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonRaceGuideDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDetailDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonSpectatorSubsessionIdsDetailDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonSpectatorSubsessionIdsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesAssetsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesAssetsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getSeriesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesPastSeasonsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonListDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesSeasonListDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesSeasonScheduleDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesSeasonsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesStatsSeriesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getStatsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBestsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberBestsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareerDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberCareerDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberDivisionDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecapDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberRecapDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberRecentRacesDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberSummaryDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberYearlyDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonDriverStandingsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonQualifyResultsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonSupersessionStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonSupersessionStandingsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonTTResultsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonTTStandingsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonTeamStandingsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsWorldRecordsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getTeamDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTeamGetDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamMembershipDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTeamMembershipDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getTimeAttackDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTimeAttackMemberSeasonResultsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackAssetsDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTrackAssetsDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { + return localVarFp.getTrackDocs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTrackGetDocs(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getDriverStatsByCategoryCategoryDocs operation in DocApi. + */ +export interface DocApiGetDriverStatsByCategoryCategoryDocsRequest { + /** + * Racing category. + */ + readonly category: IracingCategory +} + +/** + * DocApi - object-oriented interface + */ +export class DocApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarAssetsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getCarAssetsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarClassDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getCarClassDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarClassGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getCarClassGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getCarDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getCarGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsCategoriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getConstantsCategoriesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsDivisionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getConstantsDivisionsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getConstantsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsEventTypesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getConstantsEventTypesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {DocApiGetDriverStatsByCategoryCategoryDocsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDriverStatsByCategoryCategoryDocs(requestParameters: DocApiGetDriverStatsByCategoryCategoryDocsRequest, options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getDriverStatsByCategoryCategoryDocs(requestParameters.category, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getDriverStatsByCategoryDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getHostedCombinedSessionsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getHostedDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getHostedSessionsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueCustomerLeagueSessionsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueDirectoryDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueDirectoryDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueGetPointsSystemsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueMembershipDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueMembershipDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueRosterDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueRosterDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueSeasonSessionsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueSeasonStandingsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLeagueSeasonsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupCountriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLookupCountriesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLookupDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupDriversDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLookupDriversDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupFlairsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLookupFlairsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLookupGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupLicensesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getLookupLicensesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberAwardInstancesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwardsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberAwardsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberChartDataDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberChartDataDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberInfoDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberInfoDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberParticipationCreditsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberProfileDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getMemberProfileDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsEventLogDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsEventLogDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapChartDataDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsLapChartDataDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapDataDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsLapDataDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchHostedDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsSearchHostedDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsSearchSeriesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getResultsSeasonResultsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeasonDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonListDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeasonListDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeasonRaceGuideDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIdsDetailDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeasonSpectatorSubsessionIdsDetailDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeasonSpectatorSubsessionIdsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesAssetsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesAssetsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesPastSeasonsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonListDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesSeasonListDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesSeasonScheduleDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesSeasonsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getSeriesStatsSeriesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberBestsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberBestsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberCareerDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberCareerDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberDivisionDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecapDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberRecapDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberRecentRacesDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberSummaryDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsMemberYearlyDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsSeasonDriverStandingsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsSeasonQualifyResultsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonSupersessionStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsSeasonSupersessionStandingsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsSeasonTTResultsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsSeasonTTStandingsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsSeasonTeamStandingsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getStatsWorldRecordsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTeamDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTeamGetDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamMembershipDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTeamMembershipDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTimeAttackDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTimeAttackDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTimeAttackMemberSeasonResultsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackAssetsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTrackAssetsDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTrackDocs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration).getTrackGetDocs(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DriverStatsApi - axios parameter creator + */ +export const DriverStatsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategory: async (category: IracingCategory, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'category' is not null or undefined + assertParamExists('getDriverStatsByCategory', 'category', category) + const localVarPath = `/data/driver_stats_by_category/{category}` + .replace(`{${"category"}}`, encodeURIComponent(String(category))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DriverStatsApi - functional programming interface + */ +export const DriverStatsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DriverStatsApiAxiosParamCreator(configuration) + return { + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDriverStatsByCategory(category: IracingCategory, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDriverStatsByCategory(category, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DriverStatsApi.getDriverStatsByCategory']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DriverStatsApi - factory interface + */ +export const DriverStatsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DriverStatsApiFp(configuration) + return { + /** + * + * @param {DriverStatsApiGetDriverStatsByCategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategory(requestParameters: DriverStatsApiGetDriverStatsByCategoryRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getDriverStatsByCategory(requestParameters.category, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getDriverStatsByCategory operation in DriverStatsApi. + */ +export interface DriverStatsApiGetDriverStatsByCategoryRequest { + /** + * Racing category. + */ + readonly category: IracingCategory +} + +/** + * DriverStatsApi - object-oriented interface + */ +export class DriverStatsApi extends BaseAPI { + /** + * + * @param {DriverStatsApiGetDriverStatsByCategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDriverStatsByCategory(requestParameters: DriverStatsApiGetDriverStatsByCategoryRequest, options?: RawAxiosRequestConfig) { + return DriverStatsApiFp(this.configuration).getDriverStatsByCategory(requestParameters.category, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * HostedApi - axios parameter creator + */ +export const HostedApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessions: async (package_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/hosted/combined_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (package_id !== undefined) { + localVarQueryParameter['package_id'] = package_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessions: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/hosted/sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * HostedApi - functional programming interface + */ +export const HostedApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = HostedApiAxiosParamCreator(configuration) + return { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedCombinedSessions(package_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedCombinedSessions(package_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['HostedApi.getHostedCombinedSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedSessions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['HostedApi.getHostedSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * HostedApi - factory interface + */ +export const HostedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = HostedApiFp(configuration) + return { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {HostedApiGetHostedCombinedSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessions(requestParameters: HostedApiGetHostedCombinedSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getHostedCombinedSessions(requestParameters.package_id, options).then((request) => request(axios, basePath)); + }, + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessions(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getHostedSessions(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getHostedCombinedSessions operation in HostedApi. + */ +export interface HostedApiGetHostedCombinedSessionsRequest { + /** + * If set, return only sessions using this car or track package ID. + */ + readonly package_id?: number +} + +/** + * HostedApi - object-oriented interface + */ +export class HostedApi extends BaseAPI { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {HostedApiGetHostedCombinedSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedCombinedSessions(requestParameters: HostedApiGetHostedCombinedSessionsRequest = {}, options?: RawAxiosRequestConfig) { + return HostedApiFp(this.configuration).getHostedCombinedSessions(requestParameters.package_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedSessions(options?: RawAxiosRequestConfig) { + return HostedApiFp(this.configuration).getHostedSessions(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * LeagueApi - axios parameter creator + */ +export const LeagueApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeague: async (league_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists('getLeague', 'league_id', league_id) + const localVarPath = `/data/league/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter['include_licenses'] = include_licenses; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {boolean} [mine] If true, return only sessions created by this user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessions: async (mine?: boolean, package_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/league/cust_league_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (mine !== undefined) { + localVarQueryParameter['mine'] = mine; + } + + if (package_id !== undefined) { + localVarQueryParameter['package_id'] = package_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} [search] Will search against league name, description, owner, and league ID. + * @param {string} [tag] One or more tags, comma-separated. + * @param {boolean} [restrict_to_member] If true include only leagues for which customer is a member. + * @param {boolean} [restrict_to_recruiting] If true include only leagues which are recruiting. + * @param {boolean} [restrict_to_friends] If true include only leagues owned by a friend. + * @param {boolean} [restrict_to_watched] If true include only leagues owned by a watched member. + * @param {number} [minimum_roster_count] If set include leagues with at least this number of members. + * @param {number} [maximum_roster_count] If set include leagues with no more than this number of members. + * @param {number} [lowerbound] First row of results to return. Defaults to 1. + * @param {number} [upperbound] Last row of results to return. Defaults to lowerbound + 39. + * @param {string} [sort] One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + * @param {string} [order] One of asc or desc. Defaults to asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectory: async (search?: string, tag?: string, restrict_to_member?: boolean, restrict_to_recruiting?: boolean, restrict_to_friends?: boolean, restrict_to_watched?: boolean, minimum_roster_count?: number, maximum_roster_count?: number, lowerbound?: number, upperbound?: number, sort?: string, order?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/league/directory`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (search !== undefined) { + localVarQueryParameter['search'] = search; + } + + if (tag !== undefined) { + localVarQueryParameter['tag'] = tag; + } + + if (restrict_to_member !== undefined) { + localVarQueryParameter['restrict_to_member'] = restrict_to_member; + } + + if (restrict_to_recruiting !== undefined) { + localVarQueryParameter['restrict_to_recruiting'] = restrict_to_recruiting; + } + + if (restrict_to_friends !== undefined) { + localVarQueryParameter['restrict_to_friends'] = restrict_to_friends; + } + + if (restrict_to_watched !== undefined) { + localVarQueryParameter['restrict_to_watched'] = restrict_to_watched; + } + + if (minimum_roster_count !== undefined) { + localVarQueryParameter['minimum_roster_count'] = minimum_roster_count; + } + + if (maximum_roster_count !== undefined) { + localVarQueryParameter['maximum_roster_count'] = maximum_roster_count; + } + + if (lowerbound !== undefined) { + localVarQueryParameter['lowerbound'] = lowerbound; + } + + if (upperbound !== undefined) { + localVarQueryParameter['upperbound'] = upperbound; + } + + if (sort !== undefined) { + localVarQueryParameter['sort'] = sort; + } + + if (order !== undefined) { + localVarQueryParameter['order'] = order; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + * @param {boolean} [include_league] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueMembership: async (cust_id?: number, include_league?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/league/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (include_league !== undefined) { + localVarQueryParameter['include_league'] = include_league; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {number} [season_id] If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeaguePointsSystems: async (league_id: number, season_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists('getLeaguePointsSystems', 'league_id', league_id) + const localVarPath = `/data/league/get_points_systems`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRoster: async (league_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists('getLeagueRoster', 'league_id', league_id) + const localVarPath = `/data/league/roster`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter['include_licenses'] = include_licenses; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {boolean} [results_only] If true include only sessions for which results are available. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessions: async (league_id: number, season_id: number, results_only?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists('getLeagueSeasonSessions', 'league_id', league_id) + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getLeagueSeasonSessions', 'season_id', season_id) + const localVarPath = `/data/league/season_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (results_only !== undefined) { + localVarQueryParameter['results_only'] = results_only; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {number} [car_class_id] + * @param {number} [car_id] If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandings: async (league_id: number, season_id: number, car_class_id?: number, car_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists('getLeagueSeasonStandings', 'league_id', league_id) + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getLeagueSeasonStandings', 'season_id', season_id) + const localVarPath = `/data/league/season_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (car_id !== undefined) { + localVarQueryParameter['car_id'] = car_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {boolean} [retired] If true include seasons which are no longer active. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasons: async (league_id: number, retired?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists('getLeagueSeasons', 'league_id', league_id) + const localVarPath = `/data/league/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (retired !== undefined) { + localVarQueryParameter['retired'] = retired; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LeagueApi - functional programming interface + */ +export const LeagueApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = LeagueApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeague(league_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeague(league_id, include_licenses, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeague']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {boolean} [mine] If true, return only sessions created by this user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueCustomerLeagueSessions(mine?: boolean, package_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueCustomerLeagueSessions(mine, package_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueCustomerLeagueSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} [search] Will search against league name, description, owner, and league ID. + * @param {string} [tag] One or more tags, comma-separated. + * @param {boolean} [restrict_to_member] If true include only leagues for which customer is a member. + * @param {boolean} [restrict_to_recruiting] If true include only leagues which are recruiting. + * @param {boolean} [restrict_to_friends] If true include only leagues owned by a friend. + * @param {boolean} [restrict_to_watched] If true include only leagues owned by a watched member. + * @param {number} [minimum_roster_count] If set include leagues with at least this number of members. + * @param {number} [maximum_roster_count] If set include leagues with no more than this number of members. + * @param {number} [lowerbound] First row of results to return. Defaults to 1. + * @param {number} [upperbound] Last row of results to return. Defaults to lowerbound + 39. + * @param {string} [sort] One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + * @param {string} [order] One of asc or desc. Defaults to asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueDirectory(search?: string, tag?: string, restrict_to_member?: boolean, restrict_to_recruiting?: boolean, restrict_to_friends?: boolean, restrict_to_watched?: boolean, minimum_roster_count?: number, maximum_roster_count?: number, lowerbound?: number, upperbound?: number, sort?: string, order?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueDirectory(search, tag, restrict_to_member, restrict_to_recruiting, restrict_to_friends, restrict_to_watched, minimum_roster_count, maximum_roster_count, lowerbound, upperbound, sort, order, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueDirectory']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + * @param {boolean} [include_league] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueMembership(cust_id?: number, include_league?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueMembership(cust_id, include_league, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueMembership']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {number} [season_id] If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeaguePointsSystems(league_id: number, season_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeaguePointsSystems(league_id, season_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeaguePointsSystems']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueRoster(league_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueRoster(league_id, include_licenses, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueRoster']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {boolean} [results_only] If true include only sessions for which results are available. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonSessions(league_id: number, season_id: number, results_only?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonSessions(league_id, season_id, results_only, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueSeasonSessions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {number} [car_class_id] + * @param {number} [car_id] If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonStandings(league_id: number, season_id: number, car_class_id?: number, car_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonStandings(league_id, season_id, car_class_id, car_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueSeasonStandings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {boolean} [retired] If true include seasons which are no longer active. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasons(league_id: number, retired?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasons(league_id, retired, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueSeasons']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * LeagueApi - factory interface + */ +export const LeagueApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LeagueApiFp(configuration) + return { + /** + * + * @param {LeagueApiGetLeagueRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeague(requestParameters: LeagueApiGetLeagueRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeague(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueCustomerLeagueSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessions(requestParameters: LeagueApiGetLeagueCustomerLeagueSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueCustomerLeagueSessions(requestParameters.mine, requestParameters.package_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueDirectoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectory(requestParameters: LeagueApiGetLeagueDirectoryRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueDirectory(requestParameters.search, requestParameters.tag, requestParameters.restrict_to_member, requestParameters.restrict_to_recruiting, requestParameters.restrict_to_friends, requestParameters.restrict_to_watched, requestParameters.minimum_roster_count, requestParameters.maximum_roster_count, requestParameters.lowerbound, requestParameters.upperbound, requestParameters.sort, requestParameters.order, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueMembershipRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueMembership(requestParameters: LeagueApiGetLeagueMembershipRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueMembership(requestParameters.cust_id, requestParameters.include_league, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeaguePointsSystemsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeaguePointsSystems(requestParameters: LeagueApiGetLeaguePointsSystemsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeaguePointsSystems(requestParameters.league_id, requestParameters.season_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueRosterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRoster(requestParameters: LeagueApiGetLeagueRosterRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueRoster(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueSeasonSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessions(requestParameters: LeagueApiGetLeagueSeasonSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueSeasonSessions(requestParameters.league_id, requestParameters.season_id, requestParameters.results_only, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueSeasonStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandings(requestParameters: LeagueApiGetLeagueSeasonStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueSeasonStandings(requestParameters.league_id, requestParameters.season_id, requestParameters.car_class_id, requestParameters.car_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasons(requestParameters: LeagueApiGetLeagueSeasonsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLeagueSeasons(requestParameters.league_id, requestParameters.retired, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getLeague operation in LeagueApi. + */ +export interface LeagueApiGetLeagueRequest { + readonly league_id: number + + /** + * For faster responses, only request when necessary. + */ + readonly include_licenses?: boolean +} + +/** + * Request parameters for getLeagueCustomerLeagueSessions operation in LeagueApi. + */ +export interface LeagueApiGetLeagueCustomerLeagueSessionsRequest { + /** + * If true, return only sessions created by this user. + */ + readonly mine?: boolean + + /** + * If set, return only sessions using this car or track package ID. + */ + readonly package_id?: number +} + +/** + * Request parameters for getLeagueDirectory operation in LeagueApi. + */ +export interface LeagueApiGetLeagueDirectoryRequest { + /** + * Will search against league name, description, owner, and league ID. + */ + readonly search?: string + + /** + * One or more tags, comma-separated. + */ + readonly tag?: string + + /** + * If true include only leagues for which customer is a member. + */ + readonly restrict_to_member?: boolean + + /** + * If true include only leagues which are recruiting. + */ + readonly restrict_to_recruiting?: boolean + + /** + * If true include only leagues owned by a friend. + */ + readonly restrict_to_friends?: boolean + + /** + * If true include only leagues owned by a watched member. + */ + readonly restrict_to_watched?: boolean + + /** + * If set include leagues with at least this number of members. + */ + readonly minimum_roster_count?: number + + /** + * If set include leagues with no more than this number of members. + */ + readonly maximum_roster_count?: number + + /** + * First row of results to return. Defaults to 1. + */ + readonly lowerbound?: number + + /** + * Last row of results to return. Defaults to lowerbound + 39. + */ + readonly upperbound?: number + + /** + * One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + */ + readonly sort?: string + + /** + * One of asc or desc. Defaults to asc. + */ + readonly order?: string +} + +/** + * Request parameters for getLeagueMembership operation in LeagueApi. + */ +export interface LeagueApiGetLeagueMembershipRequest { + /** + * If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + */ + readonly cust_id?: number + + readonly include_league?: boolean +} + +/** + * Request parameters for getLeaguePointsSystems operation in LeagueApi. + */ +export interface LeagueApiGetLeaguePointsSystemsRequest { + readonly league_id: number + + /** + * If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + */ + readonly season_id?: number +} + +/** + * Request parameters for getLeagueRoster operation in LeagueApi. + */ +export interface LeagueApiGetLeagueRosterRequest { + readonly league_id: number + + /** + * For faster responses, only request when necessary. + */ + readonly include_licenses?: boolean +} + +/** + * Request parameters for getLeagueSeasonSessions operation in LeagueApi. + */ +export interface LeagueApiGetLeagueSeasonSessionsRequest { + readonly league_id: number + + readonly season_id: number + + /** + * If true include only sessions for which results are available. + */ + readonly results_only?: boolean +} + +/** + * Request parameters for getLeagueSeasonStandings operation in LeagueApi. + */ +export interface LeagueApiGetLeagueSeasonStandingsRequest { + readonly league_id: number + + readonly season_id: number + + readonly car_class_id?: number + + /** + * If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + */ + readonly car_id?: number +} + +/** + * Request parameters for getLeagueSeasons operation in LeagueApi. + */ +export interface LeagueApiGetLeagueSeasonsRequest { + readonly league_id: number + + /** + * If true include seasons which are no longer active. + */ + readonly retired?: boolean +} + +/** + * LeagueApi - object-oriented interface + */ +export class LeagueApi extends BaseAPI { + /** + * + * @param {LeagueApiGetLeagueRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeague(requestParameters: LeagueApiGetLeagueRequest, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeague(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueCustomerLeagueSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueCustomerLeagueSessions(requestParameters: LeagueApiGetLeagueCustomerLeagueSessionsRequest = {}, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueCustomerLeagueSessions(requestParameters.mine, requestParameters.package_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueDirectoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueDirectory(requestParameters: LeagueApiGetLeagueDirectoryRequest = {}, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueDirectory(requestParameters.search, requestParameters.tag, requestParameters.restrict_to_member, requestParameters.restrict_to_recruiting, requestParameters.restrict_to_friends, requestParameters.restrict_to_watched, requestParameters.minimum_roster_count, requestParameters.maximum_roster_count, requestParameters.lowerbound, requestParameters.upperbound, requestParameters.sort, requestParameters.order, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueMembershipRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueMembership(requestParameters: LeagueApiGetLeagueMembershipRequest = {}, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueMembership(requestParameters.cust_id, requestParameters.include_league, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeaguePointsSystemsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeaguePointsSystems(requestParameters: LeagueApiGetLeaguePointsSystemsRequest, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeaguePointsSystems(requestParameters.league_id, requestParameters.season_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueRosterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueRoster(requestParameters: LeagueApiGetLeagueRosterRequest, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueRoster(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueSeasonSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonSessions(requestParameters: LeagueApiGetLeagueSeasonSessionsRequest, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueSeasonSessions(requestParameters.league_id, requestParameters.season_id, requestParameters.results_only, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueSeasonStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonStandings(requestParameters: LeagueApiGetLeagueSeasonStandingsRequest, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueSeasonStandings(requestParameters.league_id, requestParameters.season_id, requestParameters.car_class_id, requestParameters.car_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasons(requestParameters: LeagueApiGetLeagueSeasonsRequest, options?: RawAxiosRequestConfig) { + return LeagueApiFp(this.configuration).getLeagueSeasons(requestParameters.league_id, requestParameters.retired, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * LookupApi - axios parameter creator + */ +export const LookupApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookup: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/lookup/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupCountries: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/lookup/countries`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} search_term A cust_id or partial name for which to search. + * @param {number} [league_id] Narrow the search to the roster of the given league. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDrivers: async (search_term: string, league_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'search_term' is not null or undefined + assertParamExists('getLookupDrivers', 'search_term', search_term) + const localVarPath = `/data/lookup/drivers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (search_term !== undefined) { + localVarQueryParameter['search_term'] = search_term; + } + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupFlairs: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/lookup/flairs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupLicenses: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/lookup/licenses`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LookupApi - functional programming interface + */ +export const LookupApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = LookupApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookup(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookup(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookup']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupCountries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupCountries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupCountries']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} search_term A cust_id or partial name for which to search. + * @param {number} [league_id] Narrow the search to the roster of the given league. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupDrivers(search_term: string, league_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupDrivers(search_term, league_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupDrivers']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupFlairs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupFlairs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupFlairs']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupLicenses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupLicenses(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupLicenses']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * LookupApi - factory interface + */ +export const LookupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LookupApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookup(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookup(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupCountries(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupCountries(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {LookupApiGetLookupDriversRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDrivers(requestParameters: LookupApiGetLookupDriversRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupDrivers(requestParameters.search_term, requestParameters.league_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupFlairs(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupFlairs(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupLicenses(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getLookupLicenses(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getLookupDrivers operation in LookupApi. + */ +export interface LookupApiGetLookupDriversRequest { + /** + * A cust_id or partial name for which to search. + */ + readonly search_term: string + + /** + * Narrow the search to the roster of the given league. + */ + readonly league_id?: number +} + +/** + * LookupApi - object-oriented interface + */ +export class LookupApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookup(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration).getLookup(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupCountries(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration).getLookupCountries(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LookupApiGetLookupDriversRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupDrivers(requestParameters: LookupApiGetLookupDriversRequest, options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration).getLookupDrivers(requestParameters.search_term, requestParameters.league_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupFlairs(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration).getLookupFlairs(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupLicenses(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration).getLookupLicenses(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MemberApi - axios parameter creator + */ +export const MemberApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {string} cust_ids Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMember: async (cust_ids: string, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'cust_ids' is not null or undefined + assertParamExists('getMember', 'cust_ids', cust_ids) + const localVarPath = `/data/member/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_ids !== undefined) { + localVarQueryParameter['cust_ids'] = cust_ids; + } + + if (include_licenses !== undefined) { + localVarQueryParameter['include_licenses'] = include_licenses; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} award_id + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardInstances: async (award_id: number, cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'award_id' is not null or undefined + assertParamExists('getMemberAwardInstances', 'award_id', award_id) + const localVarPath = `/data/member/award_instances`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (award_id !== undefined) { + localVarQueryParameter['award_id'] = award_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwards: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/member/awards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} category_id 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + * @param {number} chart_type 1 - iRating; 2 - TT Rating; 3 - License/SR + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberChartData: async (category_id: number, chart_type: number, cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'category_id' is not null or undefined + assertParamExists('getMemberChartData', 'category_id', category_id) + // verify required parameter 'chart_type' is not null or undefined + assertParamExists('getMemberChartData', 'chart_type', chart_type) + const localVarPath = `/data/member/chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (category_id !== undefined) { + localVarQueryParameter['category_id'] = category_id; + } + + if (chart_type !== undefined) { + localVarQueryParameter['chart_type'] = chart_type; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberInfo: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/member/info`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberParticipationCredits: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/member/participation_credits`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Gets a requested user\'s profile. + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberProfile: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/member/profile`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MemberApi - functional programming interface + */ +export const MemberApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MemberApiAxiosParamCreator(configuration) + return { + /** + * + * @param {string} cust_ids Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMember(cust_ids: string, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMember(cust_ids, include_licenses, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMember']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} award_id + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwardInstances(award_id: number, cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwardInstances(award_id, cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberAwardInstances']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwards(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwards(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberAwards']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} category_id 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + * @param {number} chart_type 1 - iRating; 2 - TT Rating; 3 - License/SR + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberChartData(category_id: number, chart_type: number, cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberChartData(category_id, chart_type, cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberChartData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberInfo(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberInfo']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberParticipationCredits(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberParticipationCredits(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberParticipationCredits']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Gets a requested user\'s profile. + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberProfile(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberProfile(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberProfile']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * MemberApi - factory interface + */ +export const MemberApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MemberApiFp(configuration) + return { + /** + * + * @param {MemberApiGetMemberRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMember(requestParameters: MemberApiGetMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMember(requestParameters.cust_ids, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {MemberApiGetMemberAwardInstancesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardInstances(requestParameters: MemberApiGetMemberAwardInstancesRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberAwardInstances(requestParameters.award_id, requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {MemberApiGetMemberAwardsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwards(requestParameters: MemberApiGetMemberAwardsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberAwards(requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {MemberApiGetMemberChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberChartData(requestParameters: MemberApiGetMemberChartDataRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberChartData(requestParameters.category_id, requestParameters.chart_type, requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberInfo(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberInfo(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberParticipationCredits(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberParticipationCredits(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Gets a requested user\'s profile. + * @param {MemberApiGetMemberProfileRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberProfile(requestParameters: MemberApiGetMemberProfileRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getMemberProfile(requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getMember operation in MemberApi. + */ +export interface MemberApiGetMemberRequest { + /** + * Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + */ + readonly cust_ids: string + + readonly include_licenses?: boolean +} + +/** + * Request parameters for getMemberAwardInstances operation in MemberApi. + */ +export interface MemberApiGetMemberAwardInstancesRequest { + readonly award_id: number + + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getMemberAwards operation in MemberApi. + */ +export interface MemberApiGetMemberAwardsRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getMemberChartData operation in MemberApi. + */ +export interface MemberApiGetMemberChartDataRequest { + /** + * 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + */ + readonly category_id: number + + /** + * 1 - iRating; 2 - TT Rating; 3 - License/SR + */ + readonly chart_type: number + + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getMemberProfile operation in MemberApi. + */ +export interface MemberApiGetMemberProfileRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * MemberApi - object-oriented interface + */ +export class MemberApi extends BaseAPI { + /** + * + * @param {MemberApiGetMemberRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMember(requestParameters: MemberApiGetMemberRequest, options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMember(requestParameters.cust_ids, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {MemberApiGetMemberAwardInstancesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwardInstances(requestParameters: MemberApiGetMemberAwardInstancesRequest, options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMemberAwardInstances(requestParameters.award_id, requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {MemberApiGetMemberAwardsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwards(requestParameters: MemberApiGetMemberAwardsRequest = {}, options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMemberAwards(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {MemberApiGetMemberChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberChartData(requestParameters: MemberApiGetMemberChartDataRequest, options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMemberChartData(requestParameters.category_id, requestParameters.chart_type, requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberInfo(options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMemberInfo(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberParticipationCredits(options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMemberParticipationCredits(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Gets a requested user\'s profile. + * @param {MemberApiGetMemberProfileRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberProfile(requestParameters: MemberApiGetMemberProfileRequest = {}, options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration).getMemberProfile(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ResultsApi - axios parameter creator + */ +export const ResultsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} subsession_id + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResults: async (subsession_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists('getResults', 'subsession_id', subsession_id) + const localVarPath = `/data/results/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (subsession_id !== undefined) { + localVarQueryParameter['subsession_id'] = subsession_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter['include_licenses'] = include_licenses; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsEventLog: async (subsession_id: number, simsession_number: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists('getResultsEventLog', 'subsession_id', subsession_id) + // verify required parameter 'simsession_number' is not null or undefined + assertParamExists('getResultsEventLog', 'simsession_number', simsession_number) + const localVarPath = `/data/results/event_log`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (subsession_id !== undefined) { + localVarQueryParameter['subsession_id'] = subsession_id; + } + + if (simsession_number !== undefined) { + localVarQueryParameter['simsession_number'] = simsession_number; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapChartData: async (subsession_id: number, simsession_number: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists('getResultsLapChartData', 'subsession_id', subsession_id) + // verify required parameter 'simsession_number' is not null or undefined + assertParamExists('getResultsLapChartData', 'simsession_number', simsession_number) + const localVarPath = `/data/results/lap_chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (subsession_id !== undefined) { + localVarQueryParameter['subsession_id'] = subsession_id; + } + + if (simsession_number !== undefined) { + localVarQueryParameter['simsession_number'] = simsession_number; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {number} [cust_id] Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. + * @param {number} [team_id] Required if the subsession was a team event. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapData: async (subsession_id: number, simsession_number: number, cust_id?: number, team_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists('getResultsLapData', 'subsession_id', subsession_id) + // verify required parameter 'simsession_number' is not null or undefined + assertParamExists('getResultsLapData', 'simsession_number', simsession_number) + const localVarPath = `/data/results/lap_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (subsession_id !== undefined) { + localVarQueryParameter['subsession_id'] = subsession_id; + } + + if (simsession_number !== undefined) { + localVarQueryParameter['simsession_number'] = simsession_number; + } + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (team_id !== undefined) { + localVarQueryParameter['team_id'] = team_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] The participant\'s customer ID. Ignored if team_id is supplied. + * @param {number} [team_id] The team ID to search for. Takes priority over cust_id if both are supplied. + * @param {number} [host_cust_id] The host\'s customer ID. + * @param {string} [session_name] Part or all of the session\'s name. + * @param {number} [league_id] Include only results for the league with this ID. + * @param {number} [league_season_id] Include only results for the league season with this ID. + * @param {number} [car_id] One of the cars used by the session. + * @param {number} [track_id] The ID of the track used by the session. + * @param {string} [category_ids] Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchHosted: async (start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, host_cust_id?: number, session_name?: string, league_id?: number, league_season_id?: number, car_id?: number, track_id?: number, category_ids?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/results/search_hosted`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (start_range_begin !== undefined) { + localVarQueryParameter['start_range_begin'] = (start_range_begin as any instanceof Date) ? + (start_range_begin as any).toISOString() : + start_range_begin; + } + + if (start_range_end !== undefined) { + localVarQueryParameter['start_range_end'] = (start_range_end as any instanceof Date) ? + (start_range_end as any).toISOString() : + start_range_end; + } + + if (finish_range_begin !== undefined) { + localVarQueryParameter['finish_range_begin'] = (finish_range_begin as any instanceof Date) ? + (finish_range_begin as any).toISOString() : + finish_range_begin; + } + + if (finish_range_end !== undefined) { + localVarQueryParameter['finish_range_end'] = (finish_range_end as any instanceof Date) ? + (finish_range_end as any).toISOString() : + finish_range_end; + } + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (team_id !== undefined) { + localVarQueryParameter['team_id'] = team_id; + } + + if (host_cust_id !== undefined) { + localVarQueryParameter['host_cust_id'] = host_cust_id; + } + + if (session_name !== undefined) { + localVarQueryParameter['session_name'] = session_name; + } + + if (league_id !== undefined) { + localVarQueryParameter['league_id'] = league_id; + } + + if (league_season_id !== undefined) { + localVarQueryParameter['league_season_id'] = league_season_id; + } + + if (car_id !== undefined) { + localVarQueryParameter['car_id'] = car_id; + } + + if (track_id !== undefined) { + localVarQueryParameter['track_id'] = track_id; + } + + if (category_ids !== undefined) { + localVarQueryParameter['category_ids'] = category_ids; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [season_year] Required when using season_quarter. + * @param {number} [season_quarter] Required when using season_year. + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] Include only sessions in which this customer participated. Ignored if team_id is supplied. + * @param {number} [team_id] Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + * @param {number} [series_id] Include only sessions for series with this ID. + * @param {number} [race_week_num] Include only sessions with this race week number. + * @param {boolean} [official_only] If true, include only sessions earning championship points. Defaults to all. + * @param {string} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {string} [category_ids] License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchSeries: async (season_year?: number, season_quarter?: number, start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, series_id?: number, race_week_num?: number, official_only?: boolean, event_types?: string, category_ids?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/results/search_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_year !== undefined) { + localVarQueryParameter['season_year'] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter['season_quarter'] = season_quarter; + } + + if (start_range_begin !== undefined) { + localVarQueryParameter['start_range_begin'] = (start_range_begin as any instanceof Date) ? + (start_range_begin as any).toISOString() : + start_range_begin; + } + + if (start_range_end !== undefined) { + localVarQueryParameter['start_range_end'] = (start_range_end as any instanceof Date) ? + (start_range_end as any).toISOString() : + start_range_end; + } + + if (finish_range_begin !== undefined) { + localVarQueryParameter['finish_range_begin'] = (finish_range_begin as any instanceof Date) ? + (finish_range_begin as any).toISOString() : + finish_range_begin; + } + + if (finish_range_end !== undefined) { + localVarQueryParameter['finish_range_end'] = (finish_range_end as any instanceof Date) ? + (finish_range_end as any).toISOString() : + finish_range_end; + } + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (team_id !== undefined) { + localVarQueryParameter['team_id'] = team_id; + } + + if (series_id !== undefined) { + localVarQueryParameter['series_id'] = series_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + if (official_only !== undefined) { + localVarQueryParameter['official_only'] = official_only; + } + + if (event_types !== undefined) { + localVarQueryParameter['event_types'] = event_types; + } + + if (category_ids !== undefined) { + localVarQueryParameter['category_ids'] = category_ids; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {IracingEventType} [event_type] Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSeasonResults: async (season_id: number, event_type?: IracingEventType, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getResultsSeasonResults', 'season_id', season_id) + const localVarPath = `/data/results/season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (event_type !== undefined) { + localVarQueryParameter['event_type'] = event_type; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ResultsApi - functional programming interface + */ +export const ResultsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ResultsApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} subsession_id + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResults(subsession_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResults(subsession_id, include_licenses, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResults']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsEventLog(subsession_id: number, simsession_number: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsEventLog(subsession_id, simsession_number, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsEventLog']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapChartData(subsession_id: number, simsession_number: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapChartData(subsession_id, simsession_number, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsLapChartData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {number} [cust_id] Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. + * @param {number} [team_id] Required if the subsession was a team event. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapData(subsession_id: number, simsession_number: number, cust_id?: number, team_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapData(subsession_id, simsession_number, cust_id, team_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsLapData']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] The participant\'s customer ID. Ignored if team_id is supplied. + * @param {number} [team_id] The team ID to search for. Takes priority over cust_id if both are supplied. + * @param {number} [host_cust_id] The host\'s customer ID. + * @param {string} [session_name] Part or all of the session\'s name. + * @param {number} [league_id] Include only results for the league with this ID. + * @param {number} [league_season_id] Include only results for the league season with this ID. + * @param {number} [car_id] One of the cars used by the session. + * @param {number} [track_id] The ID of the track used by the session. + * @param {string} [category_ids] Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchHosted(start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, host_cust_id?: number, session_name?: string, league_id?: number, league_season_id?: number, car_id?: number, track_id?: number, category_ids?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchHosted(start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, host_cust_id, session_name, league_id, league_season_id, car_id, track_id, category_ids, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsSearchHosted']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [season_year] Required when using season_quarter. + * @param {number} [season_quarter] Required when using season_year. + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] Include only sessions in which this customer participated. Ignored if team_id is supplied. + * @param {number} [team_id] Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + * @param {number} [series_id] Include only sessions for series with this ID. + * @param {number} [race_week_num] Include only sessions with this race week number. + * @param {boolean} [official_only] If true, include only sessions earning championship points. Defaults to all. + * @param {string} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {string} [category_ids] License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchSeries(season_year?: number, season_quarter?: number, start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, series_id?: number, race_week_num?: number, official_only?: boolean, event_types?: string, category_ids?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchSeries(season_year, season_quarter, start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, series_id, race_week_num, official_only, event_types, category_ids, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsSearchSeries']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {IracingEventType} [event_type] Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSeasonResults(season_id: number, event_type?: IracingEventType, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSeasonResults(season_id, event_type, race_week_num, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsSeasonResults']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ResultsApi - factory interface + */ +export const ResultsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ResultsApiFp(configuration) + return { + /** + * + * @param {ResultsApiGetResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResults(requestParameters: ResultsApiGetResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResults(requestParameters.subsession_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsEventLogRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsEventLog(requestParameters: ResultsApiGetResultsEventLogRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsEventLog(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsLapChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapChartData(requestParameters: ResultsApiGetResultsLapChartDataRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsLapChartData(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsLapDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapData(requestParameters: ResultsApiGetResultsLapDataRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsLapData(requestParameters.subsession_id, requestParameters.simsession_number, requestParameters.cust_id, requestParameters.team_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsSearchHostedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchHosted(requestParameters: ResultsApiGetResultsSearchHostedRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsSearchHosted(requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.host_cust_id, requestParameters.session_name, requestParameters.league_id, requestParameters.league_season_id, requestParameters.car_id, requestParameters.track_id, requestParameters.category_ids, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsSearchSeriesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchSeries(requestParameters: ResultsApiGetResultsSearchSeriesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsSearchSeries(requestParameters.season_year, requestParameters.season_quarter, requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.series_id, requestParameters.race_week_num, requestParameters.official_only, requestParameters.event_types, requestParameters.category_ids, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSeasonResults(requestParameters: ResultsApiGetResultsSeasonResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getResultsSeasonResults(requestParameters.season_id, requestParameters.event_type, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getResults operation in ResultsApi. + */ +export interface ResultsApiGetResultsRequest { + readonly subsession_id: number + + readonly include_licenses?: boolean +} + +/** + * Request parameters for getResultsEventLog operation in ResultsApi. + */ +export interface ResultsApiGetResultsEventLogRequest { + readonly subsession_id: number + + /** + * The main event is 0; the preceding event is -1, and so on. + */ + readonly simsession_number: number +} + +/** + * Request parameters for getResultsLapChartData operation in ResultsApi. + */ +export interface ResultsApiGetResultsLapChartDataRequest { + readonly subsession_id: number + + /** + * The main event is 0; the preceding event is -1, and so on. + */ + readonly simsession_number: number +} + +/** + * Request parameters for getResultsLapData operation in ResultsApi. + */ +export interface ResultsApiGetResultsLapDataRequest { + readonly subsession_id: number + + /** + * The main event is 0; the preceding event is -1, and so on. + */ + readonly simsession_number: number + + /** + * Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. + */ + readonly cust_id?: number + + /** + * Required if the subsession was a team event. + */ + readonly team_id?: number +} + +/** + * Request parameters for getResultsSearchHosted operation in ResultsApi. + */ +export interface ResultsApiGetResultsSearchHostedRequest { + /** + * Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly start_range_begin?: string + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + */ + readonly start_range_end?: string + + /** + * Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly finish_range_begin?: string + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + */ + readonly finish_range_end?: string + + /** + * The participant\'s customer ID. Ignored if team_id is supplied. + */ + readonly cust_id?: number + + /** + * The team ID to search for. Takes priority over cust_id if both are supplied. + */ + readonly team_id?: number + + /** + * The host\'s customer ID. + */ + readonly host_cust_id?: number + + /** + * Part or all of the session\'s name. + */ + readonly session_name?: string + + /** + * Include only results for the league with this ID. + */ + readonly league_id?: number + + /** + * Include only results for the league season with this ID. + */ + readonly league_season_id?: number + + /** + * One of the cars used by the session. + */ + readonly car_id?: number + + /** + * The ID of the track used by the session. + */ + readonly track_id?: number + + /** + * Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + */ + readonly category_ids?: string +} + +/** + * Request parameters for getResultsSearchSeries operation in ResultsApi. + */ +export interface ResultsApiGetResultsSearchSeriesRequest { + /** + * Required when using season_quarter. + */ + readonly season_year?: number + + /** + * Required when using season_year. + */ + readonly season_quarter?: number + + /** + * Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly start_range_begin?: string + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + */ + readonly start_range_end?: string + + /** + * Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly finish_range_begin?: string + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + */ + readonly finish_range_end?: string + + /** + * Include only sessions in which this customer participated. Ignored if team_id is supplied. + */ + readonly cust_id?: number + + /** + * Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + */ + readonly team_id?: number + + /** + * Include only sessions for series with this ID. + */ + readonly series_id?: number + + /** + * Include only sessions with this race week number. + */ + readonly race_week_num?: number + + /** + * If true, include only sessions earning championship points. Defaults to all. + */ + readonly official_only?: boolean + + /** + * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + */ + readonly event_types?: string + + /** + * License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + */ + readonly category_ids?: string +} + +/** + * Request parameters for getResultsSeasonResults operation in ResultsApi. + */ +export interface ResultsApiGetResultsSeasonResultsRequest { + readonly season_id: number + + /** + * Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + */ + readonly event_type?: IracingEventType + + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number +} + +/** + * ResultsApi - object-oriented interface + */ +export class ResultsApi extends BaseAPI { + /** + * + * @param {ResultsApiGetResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResults(requestParameters: ResultsApiGetResultsRequest, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResults(requestParameters.subsession_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsEventLogRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsEventLog(requestParameters: ResultsApiGetResultsEventLogRequest, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResultsEventLog(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsLapChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapChartData(requestParameters: ResultsApiGetResultsLapChartDataRequest, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResultsLapChartData(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsLapDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapData(requestParameters: ResultsApiGetResultsLapDataRequest, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResultsLapData(requestParameters.subsession_id, requestParameters.simsession_number, requestParameters.cust_id, requestParameters.team_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsSearchHostedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchHosted(requestParameters: ResultsApiGetResultsSearchHostedRequest = {}, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResultsSearchHosted(requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.host_cust_id, requestParameters.session_name, requestParameters.league_id, requestParameters.league_season_id, requestParameters.car_id, requestParameters.track_id, requestParameters.category_ids, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsSearchSeriesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchSeries(requestParameters: ResultsApiGetResultsSearchSeriesRequest = {}, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResultsSearchSeries(requestParameters.season_year, requestParameters.season_quarter, requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.series_id, requestParameters.race_week_num, requestParameters.official_only, requestParameters.event_types, requestParameters.category_ids, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSeasonResults(requestParameters: ResultsApiGetResultsSeasonResultsRequest, options?: RawAxiosRequestConfig) { + return ResultsApiFp(this.configuration).getResultsSeasonResults(requestParameters.season_id, requestParameters.event_type, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * SeasonApi - axios parameter creator + */ +export const SeasonApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} season_year + * @param {number} season_quarter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonList: async (season_year: number, season_quarter: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_year' is not null or undefined + assertParamExists('getSeasonList', 'season_year', season_year) + // verify required parameter 'season_quarter' is not null or undefined + assertParamExists('getSeasonList', 'season_quarter', season_quarter) + const localVarPath = `/data/season/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_year !== undefined) { + localVarQueryParameter['season_year'] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter['season_quarter'] = season_quarter; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} [from] ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + * @param {boolean} [include_end_after_from] Include sessions which start before \'from\' but end after. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonRaceGuide: async (from?: string, include_end_after_from?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/season/race_guide`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (from !== undefined) { + localVarQueryParameter['from'] = (from as any instanceof Date) ? + (from as any).toISOString() : + from; + } + + if (include_end_after_from !== undefined) { + localVarQueryParameter['include_end_after_from'] = include_end_after_from; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIds: async (event_types?: Array, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/season/spectator_subsessionids`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (event_types) { + localVarQueryParameter['event_types'] = event_types; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {Array} [season_ids] Seasons to include in the search. Defaults to all. ?season_ids=513,937 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDetail: async (event_types?: Array, season_ids?: Array, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/season/spectator_subsessionids_detail`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (event_types) { + localVarQueryParameter['event_types'] = event_types; + } + + if (season_ids) { + localVarQueryParameter['season_ids'] = season_ids; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SeasonApi - functional programming interface + */ +export const SeasonApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SeasonApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} season_year + * @param {number} season_quarter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonList(season_year: number, season_quarter: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonList(season_year, season_quarter, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} [from] ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + * @param {boolean} [include_end_after_from] Include sessions which start before \'from\' but end after. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonRaceGuide(from?: string, include_end_after_from?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonRaceGuide(from, include_end_after_from, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonRaceGuide']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonSpectatorSubsessionIds(event_types?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIds(event_types, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonSpectatorSubsessionIds']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {Array} [season_ids] Seasons to include in the search. Defaults to all. ?season_ids=513,937 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonSpectatorSubsessionIdsDetail(event_types?: Array, season_ids?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDetail(event_types, season_ids, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonSpectatorSubsessionIdsDetail']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * SeasonApi - factory interface + */ +export const SeasonApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SeasonApiFp(configuration) + return { + /** + * + * @param {SeasonApiGetSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonList(requestParameters: SeasonApiGetSeasonListRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonList(requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeasonApiGetSeasonRaceGuideRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonRaceGuide(requestParameters: SeasonApiGetSeasonRaceGuideRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonRaceGuide(requestParameters.from, requestParameters.include_end_after_from, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIds(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonSpectatorSubsessionIds(requestParameters.event_types, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDetail(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeasonSpectatorSubsessionIdsDetail(requestParameters.event_types, requestParameters.season_ids, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getSeasonList operation in SeasonApi. + */ +export interface SeasonApiGetSeasonListRequest { + readonly season_year: number + + readonly season_quarter: number +} + +/** + * Request parameters for getSeasonRaceGuide operation in SeasonApi. + */ +export interface SeasonApiGetSeasonRaceGuideRequest { + /** + * ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + */ + readonly from?: string + + /** + * Include sessions which start before \'from\' but end after. + */ + readonly include_end_after_from?: boolean +} + +/** + * Request parameters for getSeasonSpectatorSubsessionIds operation in SeasonApi. + */ +export interface SeasonApiGetSeasonSpectatorSubsessionIdsRequest { + /** + * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + */ + readonly event_types?: Array +} + +/** + * Request parameters for getSeasonSpectatorSubsessionIdsDetail operation in SeasonApi. + */ +export interface SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest { + /** + * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + */ + readonly event_types?: Array + + /** + * Seasons to include in the search. Defaults to all. ?season_ids=513,937 + */ + readonly season_ids?: Array +} + +/** + * SeasonApi - object-oriented interface + */ +export class SeasonApi extends BaseAPI { + /** + * + * @param {SeasonApiGetSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonList(requestParameters: SeasonApiGetSeasonListRequest, options?: RawAxiosRequestConfig) { + return SeasonApiFp(this.configuration).getSeasonList(requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeasonApiGetSeasonRaceGuideRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonRaceGuide(requestParameters: SeasonApiGetSeasonRaceGuideRequest = {}, options?: RawAxiosRequestConfig) { + return SeasonApiFp(this.configuration).getSeasonRaceGuide(requestParameters.from, requestParameters.include_end_after_from, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIds(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsRequest = {}, options?: RawAxiosRequestConfig) { + return SeasonApiFp(this.configuration).getSeasonSpectatorSubsessionIds(requestParameters.event_types, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIdsDetail(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest = {}, options?: RawAxiosRequestConfig) { + return SeasonApiFp(this.configuration).getSeasonSpectatorSubsessionIdsDetail(requestParameters.event_types, requestParameters.season_ids, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * SeriesApi - axios parameter creator + */ +export const SeriesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeries: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/series/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesAssets: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/series/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} series_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesPastSeasons: async (series_id: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'series_id' is not null or undefined + assertParamExists('getSeriesPastSeasons', 'series_id', series_id) + const localVarPath = `/data/series/past_seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (series_id !== undefined) { + localVarQueryParameter['series_id'] = series_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] + * @param {number} [season_quarter] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonList: async (include_series?: boolean, season_year?: number, season_quarter?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/series/season_list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (include_series !== undefined) { + localVarQueryParameter['include_series'] = include_series; + } + + if (season_year !== undefined) { + localVarQueryParameter['season_year'] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter['season_quarter'] = season_quarter; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonSchedule: async (season_id: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getSeriesSeasonSchedule', 'season_id', season_id) + const localVarPath = `/data/series/season_schedule`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {number} [season_quarter] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasons: async (include_series?: boolean, season_year?: number, season_quarter?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/series/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (include_series !== undefined) { + localVarQueryParameter['include_series'] = include_series; + } + + if (season_year !== undefined) { + localVarQueryParameter['season_year'] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter['season_quarter'] = season_quarter; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeries: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/series/stats_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * SeriesApi - functional programming interface + */ +export const SeriesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = SeriesApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeries']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesAssets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesAssets(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesAssets']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} series_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesPastSeasons(series_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesPastSeasons(series_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesPastSeasons']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] + * @param {number} [season_quarter] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonList(include_series?: boolean, season_year?: number, season_quarter?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonList(include_series, season_year, season_quarter, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesSeasonList']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonSchedule(season_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonSchedule(season_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesSeasonSchedule']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {number} [season_quarter] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasons(include_series?: boolean, season_year?: number, season_quarter?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasons(include_series, season_year, season_quarter, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesSeasons']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesStatsSeries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesStatsSeries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesStatsSeries']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * SeriesApi - factory interface + */ +export const SeriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = SeriesApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeries(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeries(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesAssets(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesAssets(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesPastSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesPastSeasons(requestParameters: SeriesApiGetSeriesPastSeasonsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesPastSeasons(requestParameters.series_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonList(requestParameters: SeriesApiGetSeriesSeasonListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesSeasonList(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesSeasonScheduleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonSchedule(requestParameters: SeriesApiGetSeriesSeasonScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesSeasonSchedule(requestParameters.season_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasons(requestParameters: SeriesApiGetSeriesSeasonsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesSeasons(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeries(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getSeriesStatsSeries(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getSeriesPastSeasons operation in SeriesApi. + */ +export interface SeriesApiGetSeriesPastSeasonsRequest { + readonly series_id: number +} + +/** + * Request parameters for getSeriesSeasonList operation in SeriesApi. + */ +export interface SeriesApiGetSeriesSeasonListRequest { + readonly include_series?: boolean + + readonly season_year?: number + + readonly season_quarter?: number +} + +/** + * Request parameters for getSeriesSeasonSchedule operation in SeriesApi. + */ +export interface SeriesApiGetSeriesSeasonScheduleRequest { + readonly season_id: number +} + +/** + * Request parameters for getSeriesSeasons operation in SeriesApi. + */ +export interface SeriesApiGetSeriesSeasonsRequest { + readonly include_series?: boolean + + /** + * To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + */ + readonly season_year?: number + + /** + * To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + */ + readonly season_quarter?: number +} + +/** + * SeriesApi - object-oriented interface + */ +export class SeriesApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeries(options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeries(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesAssets(options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeriesAssets(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesPastSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesPastSeasons(requestParameters: SeriesApiGetSeriesPastSeasonsRequest, options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeriesPastSeasons(requestParameters.series_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonList(requestParameters: SeriesApiGetSeriesSeasonListRequest = {}, options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeriesSeasonList(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesSeasonScheduleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonSchedule(requestParameters: SeriesApiGetSeriesSeasonScheduleRequest, options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeriesSeasonSchedule(requestParameters.season_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasons(requestParameters: SeriesApiGetSeriesSeasonsRequest = {}, options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeriesSeasons(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesStatsSeries(options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration).getSeriesStatsSeries(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * StatsApi - axios parameter creator + */ +export const StatsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {number} [car_id] First call should exclude car_id; use cars_driven list in return for subsequent calls. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBests: async (cust_id?: number, car_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/stats/member_bests`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (car_id !== undefined) { + localVarQueryParameter['car_id'] = car_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareer: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/stats/member_career`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {GetStatsMemberDivisionEventTypeEnum} event_type The event type code for the division type: 4 - Time Trial; 5 - Race + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivision: async (season_id: number, event_type: GetStatsMemberDivisionEventTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsMemberDivision', 'season_id', season_id) + // verify required parameter 'event_type' is not null or undefined + assertParamExists('getStatsMemberDivision', 'event_type', event_type) + const localVarPath = `/data/stats/member_division`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (event_type !== undefined) { + localVarQueryParameter['event_type'] = event_type; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {GetStatsMemberRecapYearEnum} [year] Season year; if not supplied the current calendar year (UTC) is used. + * @param {number} [season] Season (quarter) within the year; if not supplied the recap will be for the entire year. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecap: async (cust_id?: number, year?: GetStatsMemberRecapYearEnum, season?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/stats/member_recap`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + if (year !== undefined) { + localVarQueryParameter['year'] = year; + } + + if (season !== undefined) { + localVarQueryParameter['season'] = season; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRaces: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/stats/member_recent_races`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberSummary: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/stats/member_summary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberYearly: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/stats/member_yearly`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (cust_id !== undefined) { + localVarQueryParameter['cust_id'] = cust_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonDriverStandings: async (season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsSeasonDriverStandings', 'season_id', season_id) + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists('getStatsSeasonDriverStandings', 'car_class_id', car_class_id) + const localVarPath = `/data/stats/season_driver_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (division !== undefined) { + localVarQueryParameter['division'] = division; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonQualifyResults: async (season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsSeasonQualifyResults', 'season_id', season_id) + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists('getStatsSeasonQualifyResults', 'car_class_id', car_class_id) + // verify required parameter 'race_week_num' is not null or undefined + assertParamExists('getStatsSeasonQualifyResults', 'race_week_num', race_week_num) + const localVarPath = `/data/stats/season_qualify_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + if (division !== undefined) { + localVarQueryParameter['division'] = division; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonSupersessionStandings: async (season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsSeasonSupersessionStandings', 'season_id', season_id) + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists('getStatsSeasonSupersessionStandings', 'car_class_id', car_class_id) + const localVarPath = `/data/stats/season_supersession_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (division !== undefined) { + localVarQueryParameter['division'] = division; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTeamStandings: async (season_id: number, car_class_id: number, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsSeasonTeamStandings', 'season_id', season_id) + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists('getStatsSeasonTeamStandings', 'car_class_id', car_class_id) + const localVarPath = `/data/stats/season_team_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTimeTrialResults: async (season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsSeasonTimeTrialResults', 'season_id', season_id) + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists('getStatsSeasonTimeTrialResults', 'car_class_id', car_class_id) + // verify required parameter 'race_week_num' is not null or undefined + assertParamExists('getStatsSeasonTimeTrialResults', 'race_week_num', race_week_num) + const localVarPath = `/data/stats/season_time_trial_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + if (division !== undefined) { + localVarQueryParameter['division'] = division; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTimeTrialStandings: async (season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists('getStatsSeasonTimeTrialStandings', 'season_id', season_id) + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists('getStatsSeasonTimeTrialStandings', 'car_class_id', car_class_id) + const localVarPath = `/data/stats/season_time_trial_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (season_id !== undefined) { + localVarQueryParameter['season_id'] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter['car_class_id'] = car_class_id; + } + + if (division !== undefined) { + localVarQueryParameter['division'] = division; + } + + if (race_week_num !== undefined) { + localVarQueryParameter['race_week_num'] = race_week_num; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} car_id + * @param {number} track_id + * @param {number} [season_year] Limit best times to a given year. + * @param {number} [season_quarter] Limit best times to a given quarter; only applicable when year is used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsWorldRecords: async (car_id: number, track_id: number, season_year?: number, season_quarter?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'car_id' is not null or undefined + assertParamExists('getStatsWorldRecords', 'car_id', car_id) + // verify required parameter 'track_id' is not null or undefined + assertParamExists('getStatsWorldRecords', 'track_id', track_id) + const localVarPath = `/data/stats/world_records`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (car_id !== undefined) { + localVarQueryParameter['car_id'] = car_id; + } + + if (track_id !== undefined) { + localVarQueryParameter['track_id'] = track_id; + } + + if (season_year !== undefined) { + localVarQueryParameter['season_year'] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter['season_quarter'] = season_quarter; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StatsApi - functional programming interface + */ +export const StatsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StatsApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {number} [car_id] First call should exclude car_id; use cars_driven list in return for subsequent calls. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberBests(cust_id?: number, car_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberBests(cust_id, car_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberBests']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberCareer(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberCareer(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberCareer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {GetStatsMemberDivisionEventTypeEnum} event_type The event type code for the division type: 4 - Time Trial; 5 - Race + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberDivision(season_id: number, event_type: GetStatsMemberDivisionEventTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberDivision(season_id, event_type, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberDivision']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {GetStatsMemberRecapYearEnum} [year] Season year; if not supplied the current calendar year (UTC) is used. + * @param {number} [season] Season (quarter) within the year; if not supplied the recap will be for the entire year. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecap(cust_id?: number, year?: GetStatsMemberRecapYearEnum, season?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecap(cust_id, year, season, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberRecap']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecentRaces(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecentRaces(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberRecentRaces']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberSummary(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberSummary(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberSummary']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberYearly(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberYearly(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberYearly']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonDriverStandings(season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonDriverStandings(season_id, car_class_id, division, race_week_num, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonDriverStandings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonQualifyResults(season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonQualifyResults(season_id, car_class_id, race_week_num, division, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonQualifyResults']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonSupersessionStandings(season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonSupersessionStandings(season_id, car_class_id, division, race_week_num, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonSupersessionStandings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTeamStandings(season_id: number, car_class_id: number, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTeamStandings(season_id, car_class_id, race_week_num, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonTeamStandings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTimeTrialResults(season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTimeTrialResults(season_id, car_class_id, race_week_num, division, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonTimeTrialResults']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTimeTrialStandings(season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTimeTrialStandings(season_id, car_class_id, division, race_week_num, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonTimeTrialStandings']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} car_id + * @param {number} track_id + * @param {number} [season_year] Limit best times to a given year. + * @param {number} [season_quarter] Limit best times to a given quarter; only applicable when year is used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsWorldRecords(car_id: number, track_id: number, season_year?: number, season_quarter?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsWorldRecords(car_id, track_id, season_year, season_quarter, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsWorldRecords']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * StatsApi - factory interface + */ +export const StatsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StatsApiFp(configuration) + return { + /** + * + * @param {StatsApiGetStatsMemberBestsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBests(requestParameters: StatsApiGetStatsMemberBestsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberBests(requestParameters.cust_id, requestParameters.car_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberCareerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareer(requestParameters: StatsApiGetStatsMemberCareerRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberCareer(requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberDivisionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivision(requestParameters: StatsApiGetStatsMemberDivisionRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberDivision(requestParameters.season_id, requestParameters.event_type, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberRecapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecap(requestParameters: StatsApiGetStatsMemberRecapRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberRecap(requestParameters.cust_id, requestParameters.year, requestParameters.season, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberRecentRacesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRaces(requestParameters: StatsApiGetStatsMemberRecentRacesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberRecentRaces(requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberSummaryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberSummary(requestParameters: StatsApiGetStatsMemberSummaryRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberSummary(requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberYearlyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberYearly(requestParameters: StatsApiGetStatsMemberYearlyRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsMemberYearly(requestParameters.cust_id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonDriverStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonDriverStandings(requestParameters: StatsApiGetStatsSeasonDriverStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonDriverStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonQualifyResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonQualifyResults(requestParameters: StatsApiGetStatsSeasonQualifyResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonQualifyResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonSupersessionStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonSupersessionStandings(requestParameters: StatsApiGetStatsSeasonSupersessionStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonSupersessionStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonTeamStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTeamStandings(requestParameters: StatsApiGetStatsSeasonTeamStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonTeamStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTimeTrialResults(requestParameters: StatsApiGetStatsSeasonTimeTrialResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonTimeTrialResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTimeTrialStandings(requestParameters: StatsApiGetStatsSeasonTimeTrialStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsSeasonTimeTrialStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsWorldRecordsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsWorldRecords(requestParameters: StatsApiGetStatsWorldRecordsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getStatsWorldRecords(requestParameters.car_id, requestParameters.track_id, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getStatsMemberBests operation in StatsApi. + */ +export interface StatsApiGetStatsMemberBestsRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number + + /** + * First call should exclude car_id; use cars_driven list in return for subsequent calls. + */ + readonly car_id?: number +} + +/** + * Request parameters for getStatsMemberCareer operation in StatsApi. + */ +export interface StatsApiGetStatsMemberCareerRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getStatsMemberDivision operation in StatsApi. + */ +export interface StatsApiGetStatsMemberDivisionRequest { + readonly season_id: number + + /** + * The event type code for the division type: 4 - Time Trial; 5 - Race + */ + readonly event_type: GetStatsMemberDivisionEventTypeEnum +} + +/** + * Request parameters for getStatsMemberRecap operation in StatsApi. + */ +export interface StatsApiGetStatsMemberRecapRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number + + /** + * Season year; if not supplied the current calendar year (UTC) is used. + */ + readonly year?: GetStatsMemberRecapYearEnum + + /** + * Season (quarter) within the year; if not supplied the recap will be for the entire year. + */ + readonly season?: number +} + +/** + * Request parameters for getStatsMemberRecentRaces operation in StatsApi. + */ +export interface StatsApiGetStatsMemberRecentRacesRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getStatsMemberSummary operation in StatsApi. + */ +export interface StatsApiGetStatsMemberSummaryRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getStatsMemberYearly operation in StatsApi. + */ +export interface StatsApiGetStatsMemberYearlyRequest { + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number +} + +/** + * Request parameters for getStatsSeasonDriverStandings operation in StatsApi. + */ +export interface StatsApiGetStatsSeasonDriverStandingsRequest { + readonly season_id: number + + readonly car_class_id: number + + readonly division?: IracingDivision + + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number +} + +/** + * Request parameters for getStatsSeasonQualifyResults operation in StatsApi. + */ +export interface StatsApiGetStatsSeasonQualifyResultsRequest { + readonly season_id: number + + readonly car_class_id: number + + /** + * The first race week of a season is 0. + */ + readonly race_week_num: number + + readonly division?: IracingDivision +} + +/** + * Request parameters for getStatsSeasonSupersessionStandings operation in StatsApi. + */ +export interface StatsApiGetStatsSeasonSupersessionStandingsRequest { + readonly season_id: number + + readonly car_class_id: number + + readonly division?: IracingDivision + + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number +} + +/** + * Request parameters for getStatsSeasonTeamStandings operation in StatsApi. + */ +export interface StatsApiGetStatsSeasonTeamStandingsRequest { + readonly season_id: number + + readonly car_class_id: number + + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number +} + +/** + * Request parameters for getStatsSeasonTimeTrialResults operation in StatsApi. + */ +export interface StatsApiGetStatsSeasonTimeTrialResultsRequest { + readonly season_id: number + + readonly car_class_id: number + + /** + * The first race week of a season is 0. + */ + readonly race_week_num: number + + readonly division?: IracingDivision +} + +/** + * Request parameters for getStatsSeasonTimeTrialStandings operation in StatsApi. + */ +export interface StatsApiGetStatsSeasonTimeTrialStandingsRequest { + readonly season_id: number + + readonly car_class_id: number + + readonly division?: IracingDivision + + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number +} + +/** + * Request parameters for getStatsWorldRecords operation in StatsApi. + */ +export interface StatsApiGetStatsWorldRecordsRequest { + readonly car_id: number + + readonly track_id: number + + /** + * Limit best times to a given year. + */ + readonly season_year?: number + + /** + * Limit best times to a given quarter; only applicable when year is used. + */ + readonly season_quarter?: number +} + +/** + * StatsApi - object-oriented interface + */ +export class StatsApi extends BaseAPI { + /** + * + * @param {StatsApiGetStatsMemberBestsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberBests(requestParameters: StatsApiGetStatsMemberBestsRequest = {}, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberBests(requestParameters.cust_id, requestParameters.car_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberCareerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberCareer(requestParameters: StatsApiGetStatsMemberCareerRequest = {}, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberCareer(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberDivisionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberDivision(requestParameters: StatsApiGetStatsMemberDivisionRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberDivision(requestParameters.season_id, requestParameters.event_type, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberRecapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecap(requestParameters: StatsApiGetStatsMemberRecapRequest = {}, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberRecap(requestParameters.cust_id, requestParameters.year, requestParameters.season, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberRecentRacesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecentRaces(requestParameters: StatsApiGetStatsMemberRecentRacesRequest = {}, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberRecentRaces(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberSummaryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberSummary(requestParameters: StatsApiGetStatsMemberSummaryRequest = {}, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberSummary(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberYearlyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberYearly(requestParameters: StatsApiGetStatsMemberYearlyRequest = {}, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsMemberYearly(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonDriverStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonDriverStandings(requestParameters: StatsApiGetStatsSeasonDriverStandingsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsSeasonDriverStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonQualifyResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonQualifyResults(requestParameters: StatsApiGetStatsSeasonQualifyResultsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsSeasonQualifyResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonSupersessionStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonSupersessionStandings(requestParameters: StatsApiGetStatsSeasonSupersessionStandingsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsSeasonSupersessionStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonTeamStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTeamStandings(requestParameters: StatsApiGetStatsSeasonTeamStandingsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsSeasonTeamStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTimeTrialResults(requestParameters: StatsApiGetStatsSeasonTimeTrialResultsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsSeasonTimeTrialResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTimeTrialStandings(requestParameters: StatsApiGetStatsSeasonTimeTrialStandingsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsSeasonTimeTrialStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsWorldRecordsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsWorldRecords(requestParameters: StatsApiGetStatsWorldRecordsRequest, options?: RawAxiosRequestConfig) { + return StatsApiFp(this.configuration).getStatsWorldRecords(requestParameters.car_id, requestParameters.track_id, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); + } +} + +export const GetStatsMemberDivisionEventTypeEnum = { + NUMBER_4: 4, + NUMBER_5: 5 +} as const; +export type GetStatsMemberDivisionEventTypeEnum = typeof GetStatsMemberDivisionEventTypeEnum[keyof typeof GetStatsMemberDivisionEventTypeEnum]; +export const GetStatsMemberRecapYearEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4 +} as const; +export type GetStatsMemberRecapYearEnum = typeof GetStatsMemberRecapYearEnum[keyof typeof GetStatsMemberRecapYearEnum]; + + +/** + * TeamApi - axios parameter creator + */ +export const TeamApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} team_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeam: async (team_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'team_id' is not null or undefined + assertParamExists('getTeam', 'team_id', team_id) + const localVarPath = `/data/team/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (team_id !== undefined) { + localVarQueryParameter['team_id'] = team_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter['include_licenses'] = include_licenses; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamMembership: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/team/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TeamApi - functional programming interface + */ +export const TeamApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TeamApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} team_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeam(team_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeam(team_id, include_licenses, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TeamApi.getTeam']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamMembership(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamMembership(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TeamApi.getTeamMembership']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * TeamApi - factory interface + */ +export const TeamApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TeamApiFp(configuration) + return { + /** + * + * @param {TeamApiGetTeamRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeam(requestParameters: TeamApiGetTeamRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTeam(requestParameters.team_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamMembership(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTeamMembership(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getTeam operation in TeamApi. + */ +export interface TeamApiGetTeamRequest { + readonly team_id: number + + /** + * For faster responses, only request when necessary. + */ + readonly include_licenses?: boolean +} + +/** + * TeamApi - object-oriented interface + */ +export class TeamApi extends BaseAPI { + /** + * + * @param {TeamApiGetTeamRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeam(requestParameters: TeamApiGetTeamRequest, options?: RawAxiosRequestConfig) { + return TeamApiFp(this.configuration).getTeam(requestParameters.team_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamMembership(options?: RawAxiosRequestConfig) { + return TeamApiFp(this.configuration).getTeamMembership(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TimeAttackApi - axios parameter creator + */ +export const TimeAttackApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {number} ta_comp_season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResults: async (ta_comp_season_id: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'ta_comp_season_id' is not null or undefined + assertParamExists('getTimeAttackMemberSeasonResults', 'ta_comp_season_id', ta_comp_season_id) + const localVarPath = `/data/time_attack/member_season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (ta_comp_season_id !== undefined) { + localVarQueryParameter['ta_comp_season_id'] = ta_comp_season_id; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TimeAttackApi - functional programming interface + */ +export const TimeAttackApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TimeAttackApiAxiosParamCreator(configuration) + return { + /** + * + * @param {number} ta_comp_season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTimeAttackMemberSeasonResults(ta_comp_season_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeAttackMemberSeasonResults(ta_comp_season_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TimeAttackApi.getTimeAttackMemberSeasonResults']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * TimeAttackApi - factory interface + */ +export const TimeAttackApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TimeAttackApiFp(configuration) + return { + /** + * + * @param {TimeAttackApiGetTimeAttackMemberSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResults(requestParameters: TimeAttackApiGetTimeAttackMemberSeasonResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTimeAttackMemberSeasonResults(requestParameters.ta_comp_season_id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getTimeAttackMemberSeasonResults operation in TimeAttackApi. + */ +export interface TimeAttackApiGetTimeAttackMemberSeasonResultsRequest { + readonly ta_comp_season_id: number +} + +/** + * TimeAttackApi - object-oriented interface + */ +export class TimeAttackApi extends BaseAPI { + /** + * + * @param {TimeAttackApiGetTimeAttackMemberSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTimeAttackMemberSeasonResults(requestParameters: TimeAttackApiGetTimeAttackMemberSeasonResultsRequest, options?: RawAxiosRequestConfig) { + return TimeAttackApiFp(this.configuration).getTimeAttackMemberSeasonResults(requestParameters.ta_comp_season_id, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TrackApi - axios parameter creator + */ +export const TrackApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrack: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/track/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackAssets: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/data/track/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TrackApi - functional programming interface + */ +export const TrackApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TrackApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrack(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrack(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TrackApi.getTrack']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackAssets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackAssets(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TrackApi.getTrackAssets']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * TrackApi - factory interface + */ +export const TrackApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TrackApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrack(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTrack(options).then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackAssets(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTrackAssets(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TrackApi - object-oriented interface + */ +export class TrackApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrack(options?: RawAxiosRequestConfig) { + return TrackApiFp(this.configuration).getTrack(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackAssets(options?: RawAxiosRequestConfig) { + return TrackApiFp(this.configuration).getTrackAssets(options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/packages/api/client/axios/base.ts b/packages/api/client/axios/base.ts new file mode 100644 index 0000000..8826154 --- /dev/null +++ b/packages/api/client/axios/base.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://members-ng.iracing.com".replace(/\/+$/, ""); + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +export const operationServerMap: ServerMap = { +} diff --git a/packages/api/client/axios/common.ts b/packages/api/client/axios/common.ts new file mode 100644 index 0000000..b3e29b6 --- /dev/null +++ b/packages/api/client/axios/common.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/packages/api/client/axios/configuration.ts b/packages/api/client/axios/configuration.ts new file mode 100644 index 0000000..8b733e8 --- /dev/null +++ b/packages/api/client/axios/configuration.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + */ + username?: string; + /** + * parameter for basic security + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; + /** + * override base path + */ + basePath?: string; + /** + * override server index + */ + serverIndex?: number; + /** + * base options for axios calls + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = { + ...param.baseOptions, + headers: { + ...param.baseOptions?.headers, + }, + }; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/packages/api/client/axios/docs/AuthApi.md b/packages/api/client/axios/docs/AuthApi.md new file mode 100644 index 0000000..8c824a3 --- /dev/null +++ b/packages/api/client/axios/docs/AuthApi.md @@ -0,0 +1,54 @@ +# AuthApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**postAuth**](#postauth) | **POST** /auth | | + +# **postAuth** +> postAuth() + + +### Example + +```typescript +import { + AuthApi, + Configuration, + PostAuthRequest +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +let post_auth_request: PostAuthRequest; // (optional) + +const { status, data } = await apiInstance.postAuth( + post_auth_request +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **post_auth_request** | **PostAuthRequest**| | | + + +### Return type + +void (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/CarApi.md b/packages/api/client/axios/docs/CarApi.md new file mode 100644 index 0000000..eba001a --- /dev/null +++ b/packages/api/client/axios/docs/CarApi.md @@ -0,0 +1,102 @@ +# CarApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getCar**](#getcar) | **GET** /data/car/get | | +|[**getCarAssets**](#getcarassets) | **GET** /data/car/assets | | + +# **getCar** +> IracingAPIResponse getCar() + + +### Example + +```typescript +import { + CarApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new CarApi(configuration); + +const { status, data } = await apiInstance.getCar(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getCarAssets** +> IracingAPIResponse getCarAssets() + +image paths are relative to https://images-static.iracing.com/ + +### Example + +```typescript +import { + CarApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new CarApi(configuration); + +const { status, data } = await apiInstance.getCarAssets(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/CarclassApi.md b/packages/api/client/axios/docs/CarclassApi.md new file mode 100644 index 0000000..23bc3bd --- /dev/null +++ b/packages/api/client/axios/docs/CarclassApi.md @@ -0,0 +1,54 @@ +# CarclassApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getCarClass**](#getcarclass) | **GET** /data/carclass/get | Gets car classes.| + +# **getCarClass** +> IracingAPIResponse getCarClass() + + +### Example + +```typescript +import { + CarclassApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new CarclassApi(configuration); + +const { status, data } = await apiInstance.getCarClass(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/ConstantsApi.md b/packages/api/client/axios/docs/ConstantsApi.md new file mode 100644 index 0000000..ddd863d --- /dev/null +++ b/packages/api/client/axios/docs/ConstantsApi.md @@ -0,0 +1,151 @@ +# ConstantsApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getConstantsCategories**](#getconstantscategories) | **GET** /data/constants/categories | | +|[**getConstantsDivisions**](#getconstantsdivisions) | **GET** /data/constants/divisions | | +|[**getConstantsEventTypes**](#getconstantseventtypes) | **GET** /data/constants/event_types | | + +# **getConstantsCategories** +> IracingAPIResponse getConstantsCategories() + +Constant; returned directly as an array of objects + +### Example + +```typescript +import { + ConstantsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ConstantsApi(configuration); + +const { status, data } = await apiInstance.getConstantsCategories(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getConstantsDivisions** +> IracingAPIResponse getConstantsDivisions() + +Constant; returned directly as an array of objects + +### Example + +```typescript +import { + ConstantsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ConstantsApi(configuration); + +const { status, data } = await apiInstance.getConstantsDivisions(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getConstantsEventTypes** +> IracingAPIResponse getConstantsEventTypes() + +Constant; returned directly as an array of objects + +### Example + +```typescript +import { + ConstantsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ConstantsApi(configuration); + +const { status, data } = await apiInstance.getConstantsEventTypes(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/DocApi.md b/packages/api/client/axios/docs/DocApi.md new file mode 100644 index 0000000..5407091 --- /dev/null +++ b/packages/api/client/axios/docs/DocApi.md @@ -0,0 +1,3749 @@ +# DocApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getCarAssetsDocs**](#getcarassetsdocs) | **GET** /data/doc/car/assets | | +|[**getCarClassDocs**](#getcarclassdocs) | **GET** /data/doc/carclass | | +|[**getCarClassGetDocs**](#getcarclassgetdocs) | **GET** /data/doc/carclass/get | | +|[**getCarDocs**](#getcardocs) | **GET** /data/doc/car | | +|[**getCarGetDocs**](#getcargetdocs) | **GET** /data/doc/car/get | | +|[**getConstantsCategoriesDocs**](#getconstantscategoriesdocs) | **GET** /data/doc/constants/categories | | +|[**getConstantsDivisionsDocs**](#getconstantsdivisionsdocs) | **GET** /data/doc/constants/divisions | | +|[**getConstantsDocs**](#getconstantsdocs) | **GET** /data/doc/constants | | +|[**getConstantsEventTypesDocs**](#getconstantseventtypesdocs) | **GET** /data/doc/constants/event_types | | +|[**getDocs**](#getdocs) | **GET** /data/doc | | +|[**getDriverStatsByCategoryCategoryDocs**](#getdriverstatsbycategorycategorydocs) | **GET** /data/doc/driver_stats_by_category/{category} | | +|[**getDriverStatsByCategoryDocs**](#getdriverstatsbycategorydocs) | **GET** /data/doc/driver_stats_by_category | | +|[**getHostedCombinedSessionsDocs**](#gethostedcombinedsessionsdocs) | **GET** /data/doc/hosted/combined_sessions | | +|[**getHostedDocs**](#gethosteddocs) | **GET** /data/doc/hosted | | +|[**getHostedSessionsDocs**](#gethostedsessionsdocs) | **GET** /data/doc/hosted/sessions | | +|[**getLeagueCustomerLeagueSessionsDocs**](#getleaguecustomerleaguesessionsdocs) | **GET** /data/doc/league/cust_league_sessions | | +|[**getLeagueDirectoryDocs**](#getleaguedirectorydocs) | **GET** /data/doc/league/directory | | +|[**getLeagueDocs**](#getleaguedocs) | **GET** /data/doc/league | | +|[**getLeagueGetDocs**](#getleaguegetdocs) | **GET** /data/doc/league/get | | +|[**getLeagueGetPointsSystemsDocs**](#getleaguegetpointssystemsdocs) | **GET** /data/doc/league/get_points_systems | | +|[**getLeagueMembershipDocs**](#getleaguemembershipdocs) | **GET** /data/doc/league/membership | | +|[**getLeagueRosterDocs**](#getleaguerosterdocs) | **GET** /data/doc/league/roster | | +|[**getLeagueSeasonSessionsDocs**](#getleagueseasonsessionsdocs) | **GET** /data/doc/league/season_sessions | | +|[**getLeagueSeasonStandingsDocs**](#getleagueseasonstandingsdocs) | **GET** /data/doc/league/season_standings | | +|[**getLeagueSeasonsDocs**](#getleagueseasonsdocs) | **GET** /data/doc/league/seasons | | +|[**getLookupCountriesDocs**](#getlookupcountriesdocs) | **GET** /data/doc/lookup/countries | | +|[**getLookupDocs**](#getlookupdocs) | **GET** /data/doc/lookup | | +|[**getLookupDriversDocs**](#getlookupdriversdocs) | **GET** /data/doc/lookup/drivers | | +|[**getLookupFlairsDocs**](#getlookupflairsdocs) | **GET** /data/doc/lookup/flairs | | +|[**getLookupGetDocs**](#getlookupgetdocs) | **GET** /data/doc/lookup/get | | +|[**getLookupLicensesDocs**](#getlookuplicensesdocs) | **GET** /data/doc/lookup/licenses | | +|[**getMemberAwardInstancesDocs**](#getmemberawardinstancesdocs) | **GET** /data/doc/member/award_instances | | +|[**getMemberAwardsDocs**](#getmemberawardsdocs) | **GET** /data/doc/member/awards | | +|[**getMemberChartDataDocs**](#getmemberchartdatadocs) | **GET** /data/doc/member/chart_data | | +|[**getMemberDocs**](#getmemberdocs) | **GET** /data/doc/member | | +|[**getMemberGetDocs**](#getmembergetdocs) | **GET** /data/doc/member/get | | +|[**getMemberInfoDocs**](#getmemberinfodocs) | **GET** /data/doc/member/info | | +|[**getMemberParticipationCreditsDocs**](#getmemberparticipationcreditsdocs) | **GET** /data/doc/member/participation_credits | | +|[**getMemberProfileDocs**](#getmemberprofiledocs) | **GET** /data/doc/member/profile | | +|[**getResultsDocs**](#getresultsdocs) | **GET** /data/doc/results | | +|[**getResultsEventLogDocs**](#getresultseventlogdocs) | **GET** /data/doc/results/event_log | | +|[**getResultsGetDocs**](#getresultsgetdocs) | **GET** /data/doc/results/get | | +|[**getResultsLapChartDataDocs**](#getresultslapchartdatadocs) | **GET** /data/doc/results/lap_chart_data | | +|[**getResultsLapDataDocs**](#getresultslapdatadocs) | **GET** /data/doc/results/lap_data | | +|[**getResultsSearchHostedDocs**](#getresultssearchhosteddocs) | **GET** /data/doc/results/search_hosted | | +|[**getResultsSearchSeriesDocs**](#getresultssearchseriesdocs) | **GET** /data/doc/results/search_series | | +|[**getResultsSeasonResultsDocs**](#getresultsseasonresultsdocs) | **GET** /data/doc/results/season_results | | +|[**getSeasonDocs**](#getseasondocs) | **GET** /data/doc/season | | +|[**getSeasonListDocs**](#getseasonlistdocs) | **GET** /data/doc/season/list | | +|[**getSeasonRaceGuideDocs**](#getseasonraceguidedocs) | **GET** /data/doc/season/race_guide | | +|[**getSeasonSpectatorSubsessionIdsDetailDocs**](#getseasonspectatorsubsessionidsdetaildocs) | **GET** /data/doc/season/spectator_subsessionids_detail | | +|[**getSeasonSpectatorSubsessionIdsDocs**](#getseasonspectatorsubsessionidsdocs) | **GET** /data/doc/season/spectator_subsessionids | | +|[**getSeriesAssetsDocs**](#getseriesassetsdocs) | **GET** /data/doc/series/assets | | +|[**getSeriesDocs**](#getseriesdocs) | **GET** /data/doc/series | | +|[**getSeriesGetDocs**](#getseriesgetdocs) | **GET** /data/doc/series/get | | +|[**getSeriesPastSeasonsDocs**](#getseriespastseasonsdocs) | **GET** /data/doc/series/past_seasons | | +|[**getSeriesSeasonListDocs**](#getseriesseasonlistdocs) | **GET** /data/doc/series/season_list | | +|[**getSeriesSeasonScheduleDocs**](#getseriesseasonscheduledocs) | **GET** /data/doc/series/season_schedule | | +|[**getSeriesSeasonsDocs**](#getseriesseasonsdocs) | **GET** /data/doc/series/seasons | | +|[**getSeriesStatsSeriesDocs**](#getseriesstatsseriesdocs) | **GET** /data/doc/series/stats_series | | +|[**getStatsDocs**](#getstatsdocs) | **GET** /data/doc/stats | | +|[**getStatsMemberBestsDocs**](#getstatsmemberbestsdocs) | **GET** /data/doc/stats/member_bests | | +|[**getStatsMemberCareerDocs**](#getstatsmembercareerdocs) | **GET** /data/doc/stats/member_career | | +|[**getStatsMemberDivisionDocs**](#getstatsmemberdivisiondocs) | **GET** /data/doc/stats/member_division | | +|[**getStatsMemberRecapDocs**](#getstatsmemberrecapdocs) | **GET** /data/doc/stats/member_recap | | +|[**getStatsMemberRecentRacesDocs**](#getstatsmemberrecentracesdocs) | **GET** /data/doc/stats/member_recent_races | | +|[**getStatsMemberSummaryDocs**](#getstatsmembersummarydocs) | **GET** /data/doc/stats/member_summary | | +|[**getStatsMemberYearlyDocs**](#getstatsmemberyearlydocs) | **GET** /data/doc/stats/member_yearly | | +|[**getStatsSeasonDriverStandingsDocs**](#getstatsseasondriverstandingsdocs) | **GET** /data/doc/stats/season_driver_standings | | +|[**getStatsSeasonQualifyResultsDocs**](#getstatsseasonqualifyresultsdocs) | **GET** /data/doc/stats/season_qualify_results | | +|[**getStatsSeasonSupersessionStandingsDocs**](#getstatsseasonsupersessionstandingsdocs) | **GET** /data/doc/stats/season_supersession_standings | | +|[**getStatsSeasonTTResultsDocs**](#getstatsseasonttresultsdocs) | **GET** /data/doc/stats/season_tt_results | | +|[**getStatsSeasonTTStandingsDocs**](#getstatsseasonttstandingsdocs) | **GET** /data/doc/stats/season_tt_standings | | +|[**getStatsSeasonTeamStandingsDocs**](#getstatsseasonteamstandingsdocs) | **GET** /data/doc/stats/season_team_standings | | +|[**getStatsWorldRecordsDocs**](#getstatsworldrecordsdocs) | **GET** /data/doc/stats/world_records | | +|[**getTeamDocs**](#getteamdocs) | **GET** /data/doc/team | | +|[**getTeamGetDocs**](#getteamgetdocs) | **GET** /data/doc/team/get | | +|[**getTeamMembershipDocs**](#getteammembershipdocs) | **GET** /data/doc/team/membership | | +|[**getTimeAttackDocs**](#gettimeattackdocs) | **GET** /data/doc/time_attack | | +|[**getTimeAttackMemberSeasonResultsDocs**](#gettimeattackmemberseasonresultsdocs) | **GET** /data/doc/time_attack/member_season_results | | +|[**getTrackAssetsDocs**](#gettrackassetsdocs) | **GET** /data/doc/track/assets | | +|[**getTrackDocs**](#gettrackdocs) | **GET** /data/doc/track | | +|[**getTrackGetDocs**](#gettrackgetdocs) | **GET** /data/doc/track/get | | + +# **getCarAssetsDocs** +> IracingServiceMethodDocs getCarAssetsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getCarAssetsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getCarClassDocs** +> { [key: string]: IracingServiceMethodDocs; } getCarClassDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getCarClassDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getCarClassGetDocs** +> IracingServiceMethodDocs getCarClassGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getCarClassGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getCarDocs** +> { [key: string]: IracingServiceMethodDocs; } getCarDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getCarDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getCarGetDocs** +> IracingServiceMethodDocs getCarGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getCarGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getConstantsCategoriesDocs** +> IracingServiceMethodDocs getConstantsCategoriesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getConstantsCategoriesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getConstantsDivisionsDocs** +> IracingServiceMethodDocs getConstantsDivisionsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getConstantsDivisionsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getConstantsDocs** +> { [key: string]: IracingServiceMethodDocs; } getConstantsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getConstantsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getConstantsEventTypesDocs** +> IracingServiceMethodDocs getConstantsEventTypesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getConstantsEventTypesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getDocs** +> { [key: string]: { [key: string]: IracingServiceMethodDocs; }; } getDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getDriverStatsByCategoryCategoryDocs** +> IracingServiceMethodDocs getDriverStatsByCategoryCategoryDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +let category: IracingCategory; //Racing category. (default to undefined) + +const { status, data } = await apiInstance.getDriverStatsByCategoryCategoryDocs( + category +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **category** | **IracingCategory** | Racing category. | defaults to undefined| + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getDriverStatsByCategoryDocs** +> { [key: string]: IracingServiceMethodDocs; } getDriverStatsByCategoryDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getDriverStatsByCategoryDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getHostedCombinedSessionsDocs** +> IracingServiceMethodDocs getHostedCombinedSessionsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getHostedCombinedSessionsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getHostedDocs** +> { [key: string]: IracingServiceMethodDocs; } getHostedDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getHostedDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getHostedSessionsDocs** +> IracingServiceMethodDocs getHostedSessionsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getHostedSessionsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueCustomerLeagueSessionsDocs** +> IracingServiceMethodDocs getLeagueCustomerLeagueSessionsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueCustomerLeagueSessionsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueDirectoryDocs** +> IracingServiceMethodDocs getLeagueDirectoryDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueDirectoryDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueDocs** +> { [key: string]: IracingServiceMethodDocs; } getLeagueDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueGetDocs** +> IracingServiceMethodDocs getLeagueGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueGetPointsSystemsDocs** +> IracingServiceMethodDocs getLeagueGetPointsSystemsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueGetPointsSystemsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueMembershipDocs** +> IracingServiceMethodDocs getLeagueMembershipDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueMembershipDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueRosterDocs** +> IracingServiceMethodDocs getLeagueRosterDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueRosterDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueSeasonSessionsDocs** +> IracingServiceMethodDocs getLeagueSeasonSessionsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueSeasonSessionsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueSeasonStandingsDocs** +> IracingServiceMethodDocs getLeagueSeasonStandingsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueSeasonStandingsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueSeasonsDocs** +> IracingServiceMethodDocs getLeagueSeasonsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLeagueSeasonsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupCountriesDocs** +> IracingServiceMethodDocs getLookupCountriesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLookupCountriesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupDocs** +> { [key: string]: IracingServiceMethodDocs; } getLookupDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLookupDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupDriversDocs** +> IracingServiceMethodDocs getLookupDriversDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLookupDriversDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupFlairsDocs** +> IracingServiceMethodDocs getLookupFlairsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLookupFlairsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupGetDocs** +> IracingServiceMethodDocs getLookupGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLookupGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupLicensesDocs** +> IracingServiceMethodDocs getLookupLicensesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getLookupLicensesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberAwardInstancesDocs** +> IracingServiceMethodDocs getMemberAwardInstancesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberAwardInstancesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberAwardsDocs** +> IracingServiceMethodDocs getMemberAwardsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberAwardsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberChartDataDocs** +> IracingServiceMethodDocs getMemberChartDataDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberChartDataDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberDocs** +> { [key: string]: IracingServiceMethodDocs; } getMemberDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberGetDocs** +> IracingServiceMethodDocs getMemberGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberInfoDocs** +> IracingServiceMethodDocs getMemberInfoDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberInfoDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberParticipationCreditsDocs** +> IracingServiceMethodDocs getMemberParticipationCreditsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberParticipationCreditsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberProfileDocs** +> IracingServiceMethodDocs getMemberProfileDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getMemberProfileDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsDocs** +> { [key: string]: IracingServiceMethodDocs; } getResultsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsEventLogDocs** +> IracingServiceMethodDocs getResultsEventLogDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsEventLogDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsGetDocs** +> IracingServiceMethodDocs getResultsGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsLapChartDataDocs** +> IracingServiceMethodDocs getResultsLapChartDataDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsLapChartDataDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsLapDataDocs** +> IracingServiceMethodDocs getResultsLapDataDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsLapDataDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsSearchHostedDocs** +> IracingServiceMethodDocs getResultsSearchHostedDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsSearchHostedDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsSearchSeriesDocs** +> IracingServiceMethodDocs getResultsSearchSeriesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsSearchSeriesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsSeasonResultsDocs** +> IracingServiceMethodDocs getResultsSeasonResultsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getResultsSeasonResultsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonDocs** +> { [key: string]: IracingServiceMethodDocs; } getSeasonDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeasonDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonListDocs** +> IracingServiceMethodDocs getSeasonListDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeasonListDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonRaceGuideDocs** +> IracingServiceMethodDocs getSeasonRaceGuideDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeasonRaceGuideDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonSpectatorSubsessionIdsDetailDocs** +> IracingServiceMethodDocs getSeasonSpectatorSubsessionIdsDetailDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeasonSpectatorSubsessionIdsDetailDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonSpectatorSubsessionIdsDocs** +> IracingServiceMethodDocs getSeasonSpectatorSubsessionIdsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeasonSpectatorSubsessionIdsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesAssetsDocs** +> IracingServiceMethodDocs getSeriesAssetsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesAssetsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesDocs** +> { [key: string]: IracingServiceMethodDocs; } getSeriesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesGetDocs** +> IracingServiceMethodDocs getSeriesGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesPastSeasonsDocs** +> IracingServiceMethodDocs getSeriesPastSeasonsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesPastSeasonsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesSeasonListDocs** +> IracingServiceMethodDocs getSeriesSeasonListDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesSeasonListDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesSeasonScheduleDocs** +> IracingServiceMethodDocs getSeriesSeasonScheduleDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesSeasonScheduleDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesSeasonsDocs** +> IracingServiceMethodDocs getSeriesSeasonsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesSeasonsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesStatsSeriesDocs** +> IracingServiceMethodDocs getSeriesStatsSeriesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getSeriesStatsSeriesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsDocs** +> { [key: string]: IracingServiceMethodDocs; } getStatsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberBestsDocs** +> IracingServiceMethodDocs getStatsMemberBestsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberBestsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberCareerDocs** +> IracingServiceMethodDocs getStatsMemberCareerDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberCareerDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberDivisionDocs** +> IracingServiceMethodDocs getStatsMemberDivisionDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberDivisionDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberRecapDocs** +> IracingServiceMethodDocs getStatsMemberRecapDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberRecapDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberRecentRacesDocs** +> IracingServiceMethodDocs getStatsMemberRecentRacesDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberRecentRacesDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberSummaryDocs** +> IracingServiceMethodDocs getStatsMemberSummaryDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberSummaryDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberYearlyDocs** +> IracingServiceMethodDocs getStatsMemberYearlyDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsMemberYearlyDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonDriverStandingsDocs** +> IracingServiceMethodDocs getStatsSeasonDriverStandingsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsSeasonDriverStandingsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonQualifyResultsDocs** +> IracingServiceMethodDocs getStatsSeasonQualifyResultsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsSeasonQualifyResultsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonSupersessionStandingsDocs** +> IracingServiceMethodDocs getStatsSeasonSupersessionStandingsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsSeasonSupersessionStandingsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonTTResultsDocs** +> IracingServiceMethodDocs getStatsSeasonTTResultsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsSeasonTTResultsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonTTStandingsDocs** +> IracingServiceMethodDocs getStatsSeasonTTStandingsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsSeasonTTStandingsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonTeamStandingsDocs** +> IracingServiceMethodDocs getStatsSeasonTeamStandingsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsSeasonTeamStandingsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsWorldRecordsDocs** +> IracingServiceMethodDocs getStatsWorldRecordsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getStatsWorldRecordsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTeamDocs** +> { [key: string]: IracingServiceMethodDocs; } getTeamDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTeamDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTeamGetDocs** +> IracingServiceMethodDocs getTeamGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTeamGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTeamMembershipDocs** +> IracingServiceMethodDocs getTeamMembershipDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTeamMembershipDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTimeAttackDocs** +> { [key: string]: IracingServiceMethodDocs; } getTimeAttackDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTimeAttackDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTimeAttackMemberSeasonResultsDocs** +> IracingServiceMethodDocs getTimeAttackMemberSeasonResultsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTimeAttackMemberSeasonResultsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTrackAssetsDocs** +> IracingServiceMethodDocs getTrackAssetsDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTrackAssetsDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTrackDocs** +> { [key: string]: IracingServiceMethodDocs; } getTrackDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTrackDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: IracingServiceMethodDocs; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTrackGetDocs** +> IracingServiceMethodDocs getTrackGetDocs() + + +### Example + +```typescript +import { + DocApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DocApi(configuration); + +const { status, data } = await apiInstance.getTrackGetDocs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingServiceMethodDocs** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | - | +|**401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/DriverStatsApi.md b/packages/api/client/axios/docs/DriverStatsApi.md new file mode 100644 index 0000000..8520681 --- /dev/null +++ b/packages/api/client/axios/docs/DriverStatsApi.md @@ -0,0 +1,61 @@ +# DriverStatsApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getDriverStatsByCategory**](#getdriverstatsbycategory) | **GET** /data/driver_stats_by_category/{category} | | + +# **getDriverStatsByCategory** +> IracingAPIResponse getDriverStatsByCategory() + + +### Example + +```typescript +import { + DriverStatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new DriverStatsApi(configuration); + +let category: IracingCategory; //Racing category. (default to undefined) + +const { status, data } = await apiInstance.getDriverStatsByCategory( + category +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **category** | **IracingCategory** | Racing category. | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/ErrorResponse.md b/packages/api/client/axios/docs/ErrorResponse.md new file mode 100644 index 0000000..eabd7c1 --- /dev/null +++ b/packages/api/client/axios/docs/ErrorResponse.md @@ -0,0 +1,24 @@ +# ErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **string** | | [default to undefined] +**message** | **string** | | [optional] [default to undefined] +**note** | **string** | | [optional] [default to undefined] + +## Example + +```typescript +import { ErrorResponse } from '@iracing-data/api-client-axios'; + +const instance: ErrorResponse = { + error, + message, + note, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/HostedApi.md b/packages/api/client/axios/docs/HostedApi.md new file mode 100644 index 0000000..02ff154 --- /dev/null +++ b/packages/api/client/axios/docs/HostedApi.md @@ -0,0 +1,110 @@ +# HostedApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getHostedCombinedSessions**](#gethostedcombinedsessions) | **GET** /data/hosted/combined_sessions | | +|[**getHostedSessions**](#gethostedsessions) | **GET** /data/hosted/sessions | | + +# **getHostedCombinedSessions** +> IracingAPIResponse getHostedCombinedSessions() + +Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + +### Example + +```typescript +import { + HostedApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new HostedApi(configuration); + +let package_id: number; //If set, return only sessions using this car or track package ID. (optional) (default to undefined) + +const { status, data } = await apiInstance.getHostedCombinedSessions( + package_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **package_id** | [**number**] | If set, return only sessions using this car or track package ID. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getHostedSessions** +> IracingAPIResponse getHostedSessions() + +Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + +### Example + +```typescript +import { + HostedApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new HostedApi(configuration); + +const { status, data } = await apiInstance.getHostedSessions(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/IracingAPIResponse.md b/packages/api/client/axios/docs/IracingAPIResponse.md new file mode 100644 index 0000000..29c6c24 --- /dev/null +++ b/packages/api/client/axios/docs/IracingAPIResponse.md @@ -0,0 +1,23 @@ +# IracingAPIResponse + +Response from iRacing `/data` API. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **string** | A link to the cached data | [default to undefined] +**expires** | **string** | | [default to undefined] + +## Example + +```typescript +import { IracingAPIResponse } from '@iracing-data/api-client-axios'; + +const instance: IracingAPIResponse = { + link, + expires, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/IracingCategory.md b/packages/api/client/axios/docs/IracingCategory.md new file mode 100644 index 0000000..6ab8bef --- /dev/null +++ b/packages/api/client/axios/docs/IracingCategory.md @@ -0,0 +1,19 @@ +# IracingCategory + +Racing category. + +## Enum + +* `Oval` (value: `'oval'`) + +* `Road` (value: `'road'`) + +* `DirtRoad` (value: `'dirt_road'`) + +* `DirtOval` (value: `'dirt_oval'`) + +* `SportsCar` (value: `'sports_car'`) + +* `FormulaCar` (value: `'formula_car'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/IracingDivision.md b/packages/api/client/axios/docs/IracingDivision.md new file mode 100644 index 0000000..42fc765 --- /dev/null +++ b/packages/api/client/axios/docs/IracingDivision.md @@ -0,0 +1,29 @@ +# IracingDivision + +iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. + +## Enum + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + +* `NUMBER_3` (value: `3`) + +* `NUMBER_4` (value: `4`) + +* `NUMBER_5` (value: `5`) + +* `NUMBER_6` (value: `6`) + +* `NUMBER_7` (value: `7`) + +* `NUMBER_8` (value: `8`) + +* `NUMBER_9` (value: `9`) + +* `NUMBER_10` (value: `10`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/IracingEventType.md b/packages/api/client/axios/docs/IracingEventType.md new file mode 100644 index 0000000..eb7ac70 --- /dev/null +++ b/packages/api/client/axios/docs/IracingEventType.md @@ -0,0 +1,15 @@ +# IracingEventType + +iRacing Event Type + +## Enum + +* `NUMBER_2` (value: `2`) + +* `NUMBER_3` (value: `3`) + +* `NUMBER_4` (value: `4`) + +* `NUMBER_5` (value: `5`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/IracingServiceMethodDocs.md b/packages/api/client/axios/docs/IracingServiceMethodDocs.md new file mode 100644 index 0000000..c2479a7 --- /dev/null +++ b/packages/api/client/axios/docs/IracingServiceMethodDocs.md @@ -0,0 +1,25 @@ +# IracingServiceMethodDocs + +An iRacing API Service Method object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **string** | | [default to undefined] +**parameters** | [**{ [key: string]: IracingServiceMethodParametersDocs; }**](IracingServiceMethodParametersDocs.md) | | [default to undefined] +**expirationSeconds** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { IracingServiceMethodDocs } from '@iracing-data/api-client-axios'; + +const instance: IracingServiceMethodDocs = { + link, + parameters, + expirationSeconds, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/IracingServiceMethodParametersDocs.md b/packages/api/client/axios/docs/IracingServiceMethodParametersDocs.md new file mode 100644 index 0000000..2e921d5 --- /dev/null +++ b/packages/api/client/axios/docs/IracingServiceMethodParametersDocs.md @@ -0,0 +1,25 @@ +# IracingServiceMethodParametersDocs + +An iRacing API Service Method Parameters object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [default to undefined] +**note** | **string** | | [optional] [default to undefined] +**required** | **boolean** | | [optional] [default to undefined] + +## Example + +```typescript +import { IracingServiceMethodParametersDocs } from '@iracing-data/api-client-axios'; + +const instance: IracingServiceMethodParametersDocs = { + type, + note, + required, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/LeagueApi.md b/packages/api/client/axios/docs/LeagueApi.md new file mode 100644 index 0000000..c1874f8 --- /dev/null +++ b/packages/api/client/axios/docs/LeagueApi.md @@ -0,0 +1,559 @@ +# LeagueApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getLeague**](#getleague) | **GET** /data/league/get | | +|[**getLeagueCustomerLeagueSessions**](#getleaguecustomerleaguesessions) | **GET** /data/league/cust_league_sessions | | +|[**getLeagueDirectory**](#getleaguedirectory) | **GET** /data/league/directory | | +|[**getLeagueMembership**](#getleaguemembership) | **GET** /data/league/membership | | +|[**getLeaguePointsSystems**](#getleaguepointssystems) | **GET** /data/league/get_points_systems | | +|[**getLeagueRoster**](#getleagueroster) | **GET** /data/league/roster | | +|[**getLeagueSeasonSessions**](#getleagueseasonsessions) | **GET** /data/league/season_sessions | | +|[**getLeagueSeasonStandings**](#getleagueseasonstandings) | **GET** /data/league/season_standings | | +|[**getLeagueSeasons**](#getleagueseasons) | **GET** /data/league/seasons | | + +# **getLeague** +> IracingAPIResponse getLeague() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let league_id: number; // (default to undefined) +let include_licenses: boolean; //For faster responses, only request when necessary. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeague( + league_id, + include_licenses +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **league_id** | [**number**] | | defaults to undefined| +| **include_licenses** | [**boolean**] | For faster responses, only request when necessary. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueCustomerLeagueSessions** +> IracingAPIResponse getLeagueCustomerLeagueSessions() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let mine: boolean; //If true, return only sessions created by this user. (optional) (default to undefined) +let package_id: number; //If set, return only sessions using this car or track package ID. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueCustomerLeagueSessions( + mine, + package_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **mine** | [**boolean**] | If true, return only sessions created by this user. | (optional) defaults to undefined| +| **package_id** | [**number**] | If set, return only sessions using this car or track package ID. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueDirectory** +> IracingAPIResponse getLeagueDirectory() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let search: string; //Will search against league name, description, owner, and league ID. (optional) (default to undefined) +let tag: string; //One or more tags, comma-separated. (optional) (default to undefined) +let restrict_to_member: boolean; //If true include only leagues for which customer is a member. (optional) (default to undefined) +let restrict_to_recruiting: boolean; //If true include only leagues which are recruiting. (optional) (default to undefined) +let restrict_to_friends: boolean; //If true include only leagues owned by a friend. (optional) (default to undefined) +let restrict_to_watched: boolean; //If true include only leagues owned by a watched member. (optional) (default to undefined) +let minimum_roster_count: number; //If set include leagues with at least this number of members. (optional) (default to undefined) +let maximum_roster_count: number; //If set include leagues with no more than this number of members. (optional) (default to undefined) +let lowerbound: number; //First row of results to return. Defaults to 1. (optional) (default to undefined) +let upperbound: number; //Last row of results to return. Defaults to lowerbound + 39. (optional) (default to undefined) +let sort: string; //One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. (optional) (default to undefined) +let order: string; //One of asc or desc. Defaults to asc. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueDirectory( + search, + tag, + restrict_to_member, + restrict_to_recruiting, + restrict_to_friends, + restrict_to_watched, + minimum_roster_count, + maximum_roster_count, + lowerbound, + upperbound, + sort, + order +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **search** | [**string**] | Will search against league name, description, owner, and league ID. | (optional) defaults to undefined| +| **tag** | [**string**] | One or more tags, comma-separated. | (optional) defaults to undefined| +| **restrict_to_member** | [**boolean**] | If true include only leagues for which customer is a member. | (optional) defaults to undefined| +| **restrict_to_recruiting** | [**boolean**] | If true include only leagues which are recruiting. | (optional) defaults to undefined| +| **restrict_to_friends** | [**boolean**] | If true include only leagues owned by a friend. | (optional) defaults to undefined| +| **restrict_to_watched** | [**boolean**] | If true include only leagues owned by a watched member. | (optional) defaults to undefined| +| **minimum_roster_count** | [**number**] | If set include leagues with at least this number of members. | (optional) defaults to undefined| +| **maximum_roster_count** | [**number**] | If set include leagues with no more than this number of members. | (optional) defaults to undefined| +| **lowerbound** | [**number**] | First row of results to return. Defaults to 1. | (optional) defaults to undefined| +| **upperbound** | [**number**] | Last row of results to return. Defaults to lowerbound + 39. | (optional) defaults to undefined| +| **sort** | [**string**] | One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. | (optional) defaults to undefined| +| **order** | [**string**] | One of asc or desc. Defaults to asc. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueMembership** +> IracingAPIResponse getLeagueMembership() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let cust_id: number; //If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. (optional) (default to undefined) +let include_league: boolean; // (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueMembership( + cust_id, + include_league +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. | (optional) defaults to undefined| +| **include_league** | [**boolean**] | | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeaguePointsSystems** +> IracingAPIResponse getLeaguePointsSystems() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let league_id: number; // (default to undefined) +let season_id: number; //If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeaguePointsSystems( + league_id, + season_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **league_id** | [**number**] | | defaults to undefined| +| **season_id** | [**number**] | If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueRoster** +> IracingAPIResponse getLeagueRoster() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let league_id: number; // (default to undefined) +let include_licenses: boolean; //For faster responses, only request when necessary. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueRoster( + league_id, + include_licenses +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **league_id** | [**number**] | | defaults to undefined| +| **include_licenses** | [**boolean**] | For faster responses, only request when necessary. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueSeasonSessions** +> IracingAPIResponse getLeagueSeasonSessions() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let league_id: number; // (default to undefined) +let season_id: number; // (default to undefined) +let results_only: boolean; //If true include only sessions for which results are available. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueSeasonSessions( + league_id, + season_id, + results_only +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **league_id** | [**number**] | | defaults to undefined| +| **season_id** | [**number**] | | defaults to undefined| +| **results_only** | [**boolean**] | If true include only sessions for which results are available. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueSeasonStandings** +> IracingAPIResponse getLeagueSeasonStandings() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let league_id: number; // (default to undefined) +let season_id: number; // (default to undefined) +let car_class_id: number; // (optional) (default to undefined) +let car_id: number; //If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueSeasonStandings( + league_id, + season_id, + car_class_id, + car_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **league_id** | [**number**] | | defaults to undefined| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | (optional) defaults to undefined| +| **car_id** | [**number**] | If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLeagueSeasons** +> IracingAPIResponse getLeagueSeasons() + + +### Example + +```typescript +import { + LeagueApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LeagueApi(configuration); + +let league_id: number; // (default to undefined) +let retired: boolean; //If true include seasons which are no longer active. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLeagueSeasons( + league_id, + retired +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **league_id** | [**number**] | | defaults to undefined| +| **retired** | [**boolean**] | If true include seasons which are no longer active. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/LookupApi.md b/packages/api/client/axios/docs/LookupApi.md new file mode 100644 index 0000000..446907d --- /dev/null +++ b/packages/api/client/axios/docs/LookupApi.md @@ -0,0 +1,252 @@ +# LookupApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getLookup**](#getlookup) | **GET** /data/lookup/get | | +|[**getLookupCountries**](#getlookupcountries) | **GET** /data/lookup/countries | | +|[**getLookupDrivers**](#getlookupdrivers) | **GET** /data/lookup/drivers | | +|[**getLookupFlairs**](#getlookupflairs) | **GET** /data/lookup/flairs | | +|[**getLookupLicenses**](#getlookuplicenses) | **GET** /data/lookup/licenses | | + +# **getLookup** +> IracingAPIResponse getLookup() + + +### Example + +```typescript +import { + LookupApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LookupApi(configuration); + +const { status, data } = await apiInstance.getLookup(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupCountries** +> IracingAPIResponse getLookupCountries() + + +### Example + +```typescript +import { + LookupApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LookupApi(configuration); + +const { status, data } = await apiInstance.getLookupCountries(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupDrivers** +> IracingAPIResponse getLookupDrivers() + + +### Example + +```typescript +import { + LookupApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LookupApi(configuration); + +let search_term: string; //A cust_id or partial name for which to search. (default to undefined) +let league_id: number; //Narrow the search to the roster of the given league. (optional) (default to undefined) + +const { status, data } = await apiInstance.getLookupDrivers( + search_term, + league_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **search_term** | [**string**] | A cust_id or partial name for which to search. | defaults to undefined| +| **league_id** | [**number**] | Narrow the search to the roster of the given league. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupFlairs** +> IracingAPIResponse getLookupFlairs() + + +### Example + +```typescript +import { + LookupApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LookupApi(configuration); + +const { status, data } = await apiInstance.getLookupFlairs(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getLookupLicenses** +> IracingAPIResponse getLookupLicenses() + + +### Example + +```typescript +import { + LookupApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new LookupApi(configuration); + +const { status, data } = await apiInstance.getLookupLicenses(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/MemberApi.md b/packages/api/client/axios/docs/MemberApi.md new file mode 100644 index 0000000..4907a4f --- /dev/null +++ b/packages/api/client/axios/docs/MemberApi.md @@ -0,0 +1,383 @@ +# MemberApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getMember**](#getmember) | **GET** /data/member/get | | +|[**getMemberAwardInstances**](#getmemberawardinstances) | **GET** /data/member/award_instances | | +|[**getMemberAwards**](#getmemberawards) | **GET** /data/member/awards | | +|[**getMemberChartData**](#getmemberchartdata) | **GET** /data/member/chart_data | | +|[**getMemberInfo**](#getmemberinfo) | **GET** /data/member/info | | +|[**getMemberParticipationCredits**](#getmemberparticipationcredits) | **GET** /data/member/participation_credits | | +|[**getMemberProfile**](#getmemberprofile) | **GET** /data/member/profile | Gets a requested user\'s profile.| + +# **getMember** +> IracingAPIResponse getMember() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +let cust_ids: string; //Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 (default to undefined) +let include_licenses: boolean; // (optional) (default to undefined) + +const { status, data } = await apiInstance.getMember( + cust_ids, + include_licenses +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_ids** | [**string**] | Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 | defaults to undefined| +| **include_licenses** | [**boolean**] | | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberAwardInstances** +> IracingAPIResponse getMemberAwardInstances() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +let award_id: number; // (default to undefined) +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getMemberAwardInstances( + award_id, + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **award_id** | [**number**] | | defaults to undefined| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberAwards** +> IracingAPIResponse getMemberAwards() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getMemberAwards( + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberChartData** +> IracingAPIResponse getMemberChartData() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +let category_id: number; //1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road (default to undefined) +let chart_type: number; //1 - iRating; 2 - TT Rating; 3 - License/SR (default to undefined) +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getMemberChartData( + category_id, + chart_type, + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **category_id** | [**number**] | 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road | defaults to undefined| +| **chart_type** | [**number**] | 1 - iRating; 2 - TT Rating; 3 - License/SR | defaults to undefined| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberInfo** +> IracingAPIResponse getMemberInfo() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +const { status, data } = await apiInstance.getMemberInfo(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberParticipationCredits** +> IracingAPIResponse getMemberParticipationCredits() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +const { status, data } = await apiInstance.getMemberParticipationCredits(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getMemberProfile** +> IracingAPIResponse getMemberProfile() + + +### Example + +```typescript +import { + MemberApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new MemberApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getMemberProfile( + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/PostAuthRequest.md b/packages/api/client/axios/docs/PostAuthRequest.md new file mode 100644 index 0000000..061b07b --- /dev/null +++ b/packages/api/client/axios/docs/PostAuthRequest.md @@ -0,0 +1,22 @@ +# PostAuthRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [default to undefined] +**password** | **string** | | [default to undefined] + +## Example + +```typescript +import { PostAuthRequest } from '@iracing-data/api-client-axios'; + +const instance: PostAuthRequest = { + email, + password, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/api/client/axios/docs/ResultsApi.md b/packages/api/client/axios/docs/ResultsApi.md new file mode 100644 index 0000000..aedee2c --- /dev/null +++ b/packages/api/client/axios/docs/ResultsApi.md @@ -0,0 +1,481 @@ +# ResultsApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getResults**](#getresults) | **GET** /data/results/get | | +|[**getResultsEventLog**](#getresultseventlog) | **GET** /data/results/event_log | | +|[**getResultsLapChartData**](#getresultslapchartdata) | **GET** /data/results/lap_chart_data | | +|[**getResultsLapData**](#getresultslapdata) | **GET** /data/results/lap_data | | +|[**getResultsSearchHosted**](#getresultssearchhosted) | **GET** /data/results/search_hosted | | +|[**getResultsSearchSeries**](#getresultssearchseries) | **GET** /data/results/search_series | | +|[**getResultsSeasonResults**](#getresultsseasonresults) | **GET** /data/results/season_results | | + +# **getResults** +> IracingAPIResponse getResults() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let subsession_id: number; // (default to undefined) +let include_licenses: boolean; // (optional) (default to undefined) + +const { status, data } = await apiInstance.getResults( + subsession_id, + include_licenses +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | [**number**] | | defaults to undefined| +| **include_licenses** | [**boolean**] | | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsEventLog** +> IracingAPIResponse getResultsEventLog() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let subsession_id: number; // (default to undefined) +let simsession_number: number; //The main event is 0; the preceding event is -1, and so on. (default to undefined) + +const { status, data } = await apiInstance.getResultsEventLog( + subsession_id, + simsession_number +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | [**number**] | | defaults to undefined| +| **simsession_number** | [**number**] | The main event is 0; the preceding event is -1, and so on. | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsLapChartData** +> IracingAPIResponse getResultsLapChartData() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let subsession_id: number; // (default to undefined) +let simsession_number: number; //The main event is 0; the preceding event is -1, and so on. (default to undefined) + +const { status, data } = await apiInstance.getResultsLapChartData( + subsession_id, + simsession_number +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | [**number**] | | defaults to undefined| +| **simsession_number** | [**number**] | The main event is 0; the preceding event is -1, and so on. | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsLapData** +> IracingAPIResponse getResultsLapData() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let subsession_id: number; // (default to undefined) +let simsession_number: number; //The main event is 0; the preceding event is -1, and so on. (default to undefined) +let cust_id: number; //Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. (optional) (default to undefined) +let team_id: number; //Required if the subsession was a team event. (optional) (default to undefined) + +const { status, data } = await apiInstance.getResultsLapData( + subsession_id, + simsession_number, + cust_id, + team_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | [**number**] | | defaults to undefined| +| **simsession_number** | [**number**] | The main event is 0; the preceding event is -1, and so on. | defaults to undefined| +| **cust_id** | [**number**] | Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. | (optional) defaults to undefined| +| **team_id** | [**number**] | Required if the subsession was a team event. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsSearchHosted** +> IracingAPIResponse getResultsSearchHosted() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let start_range_begin: string; //Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) (default to undefined) +let start_range_end: string; //ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. (optional) (default to undefined) +let finish_range_begin: string; //Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) (default to undefined) +let finish_range_end: string; //ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. (optional) (default to undefined) +let cust_id: number; //The participant\'s customer ID. Ignored if team_id is supplied. (optional) (default to undefined) +let team_id: number; //The team ID to search for. Takes priority over cust_id if both are supplied. (optional) (default to undefined) +let host_cust_id: number; //The host\'s customer ID. (optional) (default to undefined) +let session_name: string; //Part or all of the session\'s name. (optional) (default to undefined) +let league_id: number; //Include only results for the league with this ID. (optional) (default to undefined) +let league_season_id: number; //Include only results for the league season with this ID. (optional) (default to undefined) +let car_id: number; //One of the cars used by the session. (optional) (default to undefined) +let track_id: number; //The ID of the track used by the session. (optional) (default to undefined) +let category_ids: string; //Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 (optional) (default to undefined) + +const { status, data } = await apiInstance.getResultsSearchHosted( + start_range_begin, + start_range_end, + finish_range_begin, + finish_range_end, + cust_id, + team_id, + host_cust_id, + session_name, + league_id, + league_season_id, + car_id, + track_id, + category_ids +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **start_range_begin** | [**string**] | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | (optional) defaults to undefined| +| **start_range_end** | [**string**] | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. | (optional) defaults to undefined| +| **finish_range_begin** | [**string**] | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | (optional) defaults to undefined| +| **finish_range_end** | [**string**] | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. | (optional) defaults to undefined| +| **cust_id** | [**number**] | The participant\'s customer ID. Ignored if team_id is supplied. | (optional) defaults to undefined| +| **team_id** | [**number**] | The team ID to search for. Takes priority over cust_id if both are supplied. | (optional) defaults to undefined| +| **host_cust_id** | [**number**] | The host\'s customer ID. | (optional) defaults to undefined| +| **session_name** | [**string**] | Part or all of the session\'s name. | (optional) defaults to undefined| +| **league_id** | [**number**] | Include only results for the league with this ID. | (optional) defaults to undefined| +| **league_season_id** | [**number**] | Include only results for the league season with this ID. | (optional) defaults to undefined| +| **car_id** | [**number**] | One of the cars used by the session. | (optional) defaults to undefined| +| **track_id** | [**number**] | The ID of the track used by the session. | (optional) defaults to undefined| +| **category_ids** | [**string**] | Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsSearchSeries** +> IracingAPIResponse getResultsSearchSeries() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let season_year: number; //Required when using season_quarter. (optional) (default to undefined) +let season_quarter: number; //Required when using season_year. (optional) (default to undefined) +let start_range_begin: string; //Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) (default to undefined) +let start_range_end: string; //ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. (optional) (default to undefined) +let finish_range_begin: string; //Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) (default to undefined) +let finish_range_end: string; //ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. (optional) (default to undefined) +let cust_id: number; //Include only sessions in which this customer participated. Ignored if team_id is supplied. (optional) (default to undefined) +let team_id: number; //Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. (optional) (default to undefined) +let series_id: number; //Include only sessions for series with this ID. (optional) (default to undefined) +let race_week_num: number; //Include only sessions with this race week number. (optional) (default to undefined) +let official_only: boolean; //If true, include only sessions earning championship points. Defaults to all. (optional) (default to undefined) +let event_types: string; //Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 (optional) (default to undefined) +let category_ids: string; //License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 (optional) (default to undefined) + +const { status, data } = await apiInstance.getResultsSearchSeries( + season_year, + season_quarter, + start_range_begin, + start_range_end, + finish_range_begin, + finish_range_end, + cust_id, + team_id, + series_id, + race_week_num, + official_only, + event_types, + category_ids +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_year** | [**number**] | Required when using season_quarter. | (optional) defaults to undefined| +| **season_quarter** | [**number**] | Required when using season_year. | (optional) defaults to undefined| +| **start_range_begin** | [**string**] | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | (optional) defaults to undefined| +| **start_range_end** | [**string**] | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. | (optional) defaults to undefined| +| **finish_range_begin** | [**string**] | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | (optional) defaults to undefined| +| **finish_range_end** | [**string**] | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. | (optional) defaults to undefined| +| **cust_id** | [**number**] | Include only sessions in which this customer participated. Ignored if team_id is supplied. | (optional) defaults to undefined| +| **team_id** | [**number**] | Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. | (optional) defaults to undefined| +| **series_id** | [**number**] | Include only sessions for series with this ID. | (optional) defaults to undefined| +| **race_week_num** | [**number**] | Include only sessions with this race week number. | (optional) defaults to undefined| +| **official_only** | [**boolean**] | If true, include only sessions earning championship points. Defaults to all. | (optional) defaults to undefined| +| **event_types** | [**string**] | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | (optional) defaults to undefined| +| **category_ids** | [**string**] | License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getResultsSeasonResults** +> IracingAPIResponse getResultsSeasonResults() + + +### Example + +```typescript +import { + ResultsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new ResultsApi(configuration); + +let season_id: number; // (default to undefined) +let event_type: IracingEventType; //Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race (optional) (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (optional) (default to undefined) + +const { status, data } = await apiInstance.getResultsSeasonResults( + season_id, + event_type, + race_week_num +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **event_type** | **IracingEventType** | Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race | (optional) defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/SeasonApi.md b/packages/api/client/axios/docs/SeasonApi.md new file mode 100644 index 0000000..c09198d --- /dev/null +++ b/packages/api/client/axios/docs/SeasonApi.md @@ -0,0 +1,232 @@ +# SeasonApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getSeasonList**](#getseasonlist) | **GET** /data/season/list | | +|[**getSeasonRaceGuide**](#getseasonraceguide) | **GET** /data/season/race_guide | | +|[**getSeasonSpectatorSubsessionIds**](#getseasonspectatorsubsessionids) | **GET** /data/season/spectator_subsessionids | | +|[**getSeasonSpectatorSubsessionIdsDetail**](#getseasonspectatorsubsessionidsdetail) | **GET** /data/season/spectator_subsessionids_detail | | + +# **getSeasonList** +> IracingAPIResponse getSeasonList() + + +### Example + +```typescript +import { + SeasonApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeasonApi(configuration); + +let season_year: number; // (default to undefined) +let season_quarter: number; // (default to undefined) + +const { status, data } = await apiInstance.getSeasonList( + season_year, + season_quarter +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_year** | [**number**] | | defaults to undefined| +| **season_quarter** | [**number**] | | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonRaceGuide** +> IracingAPIResponse getSeasonRaceGuide() + + +### Example + +```typescript +import { + SeasonApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeasonApi(configuration); + +let from: string; //ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. (optional) (default to undefined) +let include_end_after_from: boolean; //Include sessions which start before \'from\' but end after. (optional) (default to undefined) + +const { status, data } = await apiInstance.getSeasonRaceGuide( + from, + include_end_after_from +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **from** | [**string**] | ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. | (optional) defaults to undefined| +| **include_end_after_from** | [**boolean**] | Include sessions which start before \'from\' but end after. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonSpectatorSubsessionIds** +> IracingAPIResponse getSeasonSpectatorSubsessionIds() + + +### Example + +```typescript +import { + SeasonApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeasonApi(configuration); + +let event_types: Array; //Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 (optional) (default to undefined) + +const { status, data } = await apiInstance.getSeasonSpectatorSubsessionIds( + event_types +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **event_types** | **Array<IracingEventType>** | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeasonSpectatorSubsessionIdsDetail** +> IracingAPIResponse getSeasonSpectatorSubsessionIdsDetail() + + +### Example + +```typescript +import { + SeasonApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeasonApi(configuration); + +let event_types: Array; //Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 (optional) (default to undefined) +let season_ids: Array; //Seasons to include in the search. Defaults to all. ?season_ids=513,937 (optional) (default to undefined) + +const { status, data } = await apiInstance.getSeasonSpectatorSubsessionIdsDetail( + event_types, + season_ids +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **event_types** | **Array<IracingEventType>** | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | (optional) defaults to undefined| +| **season_ids** | **Array<number>** | Seasons to include in the search. Defaults to all. ?season_ids=513,937 | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/SeriesApi.md b/packages/api/client/axios/docs/SeriesApi.md new file mode 100644 index 0000000..bf88829 --- /dev/null +++ b/packages/api/client/axios/docs/SeriesApi.md @@ -0,0 +1,376 @@ +# SeriesApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getSeries**](#getseries) | **GET** /data/series/get | | +|[**getSeriesAssets**](#getseriesassets) | **GET** /data/series/assets | | +|[**getSeriesPastSeasons**](#getseriespastseasons) | **GET** /data/series/past_seasons | | +|[**getSeriesSeasonList**](#getseriesseasonlist) | **GET** /data/series/season_list | | +|[**getSeriesSeasonSchedule**](#getseriesseasonschedule) | **GET** /data/series/season_schedule | | +|[**getSeriesSeasons**](#getseriesseasons) | **GET** /data/series/seasons | | +|[**getSeriesStatsSeries**](#getseriesstatsseries) | **GET** /data/series/stats_series | | + +# **getSeries** +> IracingAPIResponse getSeries() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +const { status, data } = await apiInstance.getSeries(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesAssets** +> IracingAPIResponse getSeriesAssets() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +const { status, data } = await apiInstance.getSeriesAssets(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesPastSeasons** +> IracingAPIResponse getSeriesPastSeasons() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +let series_id: number; // (default to undefined) + +const { status, data } = await apiInstance.getSeriesPastSeasons( + series_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **series_id** | [**number**] | | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesSeasonList** +> IracingAPIResponse getSeriesSeasonList() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +let include_series: boolean; // (optional) (default to undefined) +let season_year: number; // (optional) (default to undefined) +let season_quarter: number; // (optional) (default to undefined) + +const { status, data } = await apiInstance.getSeriesSeasonList( + include_series, + season_year, + season_quarter +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **include_series** | [**boolean**] | | (optional) defaults to undefined| +| **season_year** | [**number**] | | (optional) defaults to undefined| +| **season_quarter** | [**number**] | | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesSeasonSchedule** +> IracingAPIResponse getSeriesSeasonSchedule() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +let season_id: number; // (default to undefined) + +const { status, data } = await apiInstance.getSeriesSeasonSchedule( + season_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesSeasons** +> IracingAPIResponse getSeriesSeasons() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +let include_series: boolean; // (optional) (default to undefined) +let season_year: number; //To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. (optional) (default to undefined) +let season_quarter: number; //To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. (optional) (default to undefined) + +const { status, data } = await apiInstance.getSeriesSeasons( + include_series, + season_year, + season_quarter +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **include_series** | [**boolean**] | | (optional) defaults to undefined| +| **season_year** | [**number**] | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. | (optional) defaults to undefined| +| **season_quarter** | [**number**] | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSeriesStatsSeries** +> IracingAPIResponse getSeriesStatsSeries() + + +### Example + +```typescript +import { + SeriesApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new SeriesApi(configuration); + +const { status, data } = await apiInstance.getSeriesStatsSeries(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/StatsApi.md b/packages/api/client/axios/docs/StatsApi.md new file mode 100644 index 0000000..38c11f5 --- /dev/null +++ b/packages/api/client/axios/docs/StatsApi.md @@ -0,0 +1,835 @@ +# StatsApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getStatsMemberBests**](#getstatsmemberbests) | **GET** /data/stats/member_bests | | +|[**getStatsMemberCareer**](#getstatsmembercareer) | **GET** /data/stats/member_career | | +|[**getStatsMemberDivision**](#getstatsmemberdivision) | **GET** /data/stats/member_division | | +|[**getStatsMemberRecap**](#getstatsmemberrecap) | **GET** /data/stats/member_recap | | +|[**getStatsMemberRecentRaces**](#getstatsmemberrecentraces) | **GET** /data/stats/member_recent_races | | +|[**getStatsMemberSummary**](#getstatsmembersummary) | **GET** /data/stats/member_summary | | +|[**getStatsMemberYearly**](#getstatsmemberyearly) | **GET** /data/stats/member_yearly | | +|[**getStatsSeasonDriverStandings**](#getstatsseasondriverstandings) | **GET** /data/stats/season_driver_standings | | +|[**getStatsSeasonQualifyResults**](#getstatsseasonqualifyresults) | **GET** /data/stats/season_qualify_results | | +|[**getStatsSeasonSupersessionStandings**](#getstatsseasonsupersessionstandings) | **GET** /data/stats/season_supersession_standings | | +|[**getStatsSeasonTeamStandings**](#getstatsseasonteamstandings) | **GET** /data/stats/season_team_standings | | +|[**getStatsSeasonTimeTrialResults**](#getstatsseasontimetrialresults) | **GET** /data/stats/season_time_trial_results | | +|[**getStatsSeasonTimeTrialStandings**](#getstatsseasontimetrialstandings) | **GET** /data/stats/season_time_trial_standings | | +|[**getStatsWorldRecords**](#getstatsworldrecords) | **GET** /data/stats/world_records | | + +# **getStatsMemberBests** +> IracingAPIResponse getStatsMemberBests() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) +let car_id: number; //First call should exclude car_id; use cars_driven list in return for subsequent calls. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberBests( + cust_id, + car_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| +| **car_id** | [**number**] | First call should exclude car_id; use cars_driven list in return for subsequent calls. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberCareer** +> IracingAPIResponse getStatsMemberCareer() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberCareer( + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberDivision** +> IracingAPIResponse getStatsMemberDivision() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let event_type: 4 | 5; //The event type code for the division type: 4 - Time Trial; 5 - Race (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberDivision( + season_id, + event_type +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **event_type** | [**4 | 5**]**Array<4 | 5>** | The event type code for the division type: 4 - Time Trial; 5 - Race | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberRecap** +> IracingAPIResponse getStatsMemberRecap() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) +let year: 1 | 2 | 3 | 4; //Season year; if not supplied the current calendar year (UTC) is used. (optional) (default to undefined) +let season: number; //Season (quarter) within the year; if not supplied the recap will be for the entire year. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberRecap( + cust_id, + year, + season +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| +| **year** | [**1 | 2 | 3 | 4**]**Array<1 | 2 | 3 | 4>** | Season year; if not supplied the current calendar year (UTC) is used. | (optional) defaults to undefined| +| **season** | [**number**] | Season (quarter) within the year; if not supplied the recap will be for the entire year. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberRecentRaces** +> IracingAPIResponse getStatsMemberRecentRaces() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberRecentRaces( + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberSummary** +> IracingAPIResponse getStatsMemberSummary() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberSummary( + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsMemberYearly** +> IracingAPIResponse getStatsMemberYearly() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let cust_id: number; //Defaults to the authenticated member. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsMemberYearly( + cust_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cust_id** | [**number**] | Defaults to the authenticated member. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonDriverStandings** +> IracingAPIResponse getStatsSeasonDriverStandings() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let car_class_id: number; // (default to undefined) +let division: IracingDivision; // (optional) (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsSeasonDriverStandings( + season_id, + car_class_id, + division, + race_week_num +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | defaults to undefined| +| **division** | **IracingDivision** | | (optional) defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonQualifyResults** +> IracingAPIResponse getStatsSeasonQualifyResults() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let car_class_id: number; // (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (default to undefined) +let division: IracingDivision; // (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsSeasonQualifyResults( + season_id, + car_class_id, + race_week_num, + division +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | defaults to undefined| +| **division** | **IracingDivision** | | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonSupersessionStandings** +> IracingAPIResponse getStatsSeasonSupersessionStandings() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let car_class_id: number; // (default to undefined) +let division: IracingDivision; // (optional) (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsSeasonSupersessionStandings( + season_id, + car_class_id, + division, + race_week_num +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | defaults to undefined| +| **division** | **IracingDivision** | | (optional) defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonTeamStandings** +> IracingAPIResponse getStatsSeasonTeamStandings() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let car_class_id: number; // (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsSeasonTeamStandings( + season_id, + car_class_id, + race_week_num +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonTimeTrialResults** +> IracingAPIResponse getStatsSeasonTimeTrialResults() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let car_class_id: number; // (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (default to undefined) +let division: IracingDivision; // (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsSeasonTimeTrialResults( + season_id, + car_class_id, + race_week_num, + division +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | defaults to undefined| +| **division** | **IracingDivision** | | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsSeasonTimeTrialStandings** +> IracingAPIResponse getStatsSeasonTimeTrialStandings() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let season_id: number; // (default to undefined) +let car_class_id: number; // (default to undefined) +let division: IracingDivision; // (optional) (default to undefined) +let race_week_num: number; //The first race week of a season is 0. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsSeasonTimeTrialStandings( + season_id, + car_class_id, + division, + race_week_num +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **season_id** | [**number**] | | defaults to undefined| +| **car_class_id** | [**number**] | | defaults to undefined| +| **division** | **IracingDivision** | | (optional) defaults to undefined| +| **race_week_num** | [**number**] | The first race week of a season is 0. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getStatsWorldRecords** +> IracingAPIResponse getStatsWorldRecords() + + +### Example + +```typescript +import { + StatsApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new StatsApi(configuration); + +let car_id: number; // (default to undefined) +let track_id: number; // (default to undefined) +let season_year: number; //Limit best times to a given year. (optional) (default to undefined) +let season_quarter: number; //Limit best times to a given quarter; only applicable when year is used. (optional) (default to undefined) + +const { status, data } = await apiInstance.getStatsWorldRecords( + car_id, + track_id, + season_year, + season_quarter +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **car_id** | [**number**] | | defaults to undefined| +| **track_id** | [**number**] | | defaults to undefined| +| **season_year** | [**number**] | Limit best times to a given year. | (optional) defaults to undefined| +| **season_quarter** | [**number**] | Limit best times to a given quarter; only applicable when year is used. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/TeamApi.md b/packages/api/client/axios/docs/TeamApi.md new file mode 100644 index 0000000..4168be8 --- /dev/null +++ b/packages/api/client/axios/docs/TeamApi.md @@ -0,0 +1,111 @@ +# TeamApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getTeam**](#getteam) | **GET** /data/team/get | | +|[**getTeamMembership**](#getteammembership) | **GET** /data/team/membership | | + +# **getTeam** +> IracingAPIResponse getTeam() + + +### Example + +```typescript +import { + TeamApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new TeamApi(configuration); + +let team_id: number; // (default to undefined) +let include_licenses: boolean; //For faster responses, only request when necessary. (optional) (default to undefined) + +const { status, data } = await apiInstance.getTeam( + team_id, + include_licenses +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **team_id** | [**number**] | | defaults to undefined| +| **include_licenses** | [**boolean**] | For faster responses, only request when necessary. | (optional) defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTeamMembership** +> IracingAPIResponse getTeamMembership() + + +### Example + +```typescript +import { + TeamApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new TeamApi(configuration); + +const { status, data } = await apiInstance.getTeamMembership(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/TimeAttackApi.md b/packages/api/client/axios/docs/TimeAttackApi.md new file mode 100644 index 0000000..fc04c23 --- /dev/null +++ b/packages/api/client/axios/docs/TimeAttackApi.md @@ -0,0 +1,61 @@ +# TimeAttackApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getTimeAttackMemberSeasonResults**](#gettimeattackmemberseasonresults) | **GET** /data/time_attack/member_season_results | | + +# **getTimeAttackMemberSeasonResults** +> IracingAPIResponse getTimeAttackMemberSeasonResults() + + +### Example + +```typescript +import { + TimeAttackApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new TimeAttackApi(configuration); + +let ta_comp_season_id: number; // (default to undefined) + +const { status, data } = await apiInstance.getTimeAttackMemberSeasonResults( + ta_comp_season_id +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **ta_comp_season_id** | [**number**] | | defaults to undefined| + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/docs/TrackApi.md b/packages/api/client/axios/docs/TrackApi.md new file mode 100644 index 0000000..e843b24 --- /dev/null +++ b/packages/api/client/axios/docs/TrackApi.md @@ -0,0 +1,101 @@ +# TrackApi + +All URIs are relative to *https://members-ng.iracing.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**getTrack**](#gettrack) | **GET** /data/track/get | | +|[**getTrackAssets**](#gettrackassets) | **GET** /data/track/assets | | + +# **getTrack** +> IracingAPIResponse getTrack() + + +### Example + +```typescript +import { + TrackApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new TrackApi(configuration); + +const { status, data } = await apiInstance.getTrack(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getTrackAssets** +> IracingAPIResponse getTrackAssets() + + +### Example + +```typescript +import { + TrackApi, + Configuration +} from '@iracing-data/api-client-axios'; + +const configuration = new Configuration(); +const apiInstance = new TrackApi(configuration); + +const { status, data } = await apiInstance.getTrackAssets(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**IracingAPIResponse** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**401** | Access token is missing or invalid. | - | +|**429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +|**503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/packages/api/client/axios/git_push.sh b/packages/api/client/axios/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/packages/api/client/axios/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/api/client/axios/index.ts b/packages/api/client/axios/index.ts new file mode 100644 index 0000000..4a5a14d --- /dev/null +++ b/packages/api/client/axios/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/packages/api/client/axios/package.json b/packages/api/client/axios/package.json new file mode 100644 index 0000000..7ce779c --- /dev/null +++ b/packages/api/client/axios/package.json @@ -0,0 +1,31 @@ +{ + "name": "@iracing-data/api-client-axios", + "version": "0.0.1", + "description": "OpenAPI client for @iracing-data/api-client-axios", + "author": "OpenAPI-Generator Contributors", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "keywords": [ + "axios", + "typescript", + "openapi-client", + "openapi-generator", + "@iracing-data/api-client-axios" + ], + "license": "Unlicense", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepare": "npm run build" + }, + "dependencies": { + "axios": "^1.6.1" + }, + "devDependencies": { + "@types/node": "12.11.5 - 12.20.42", + "typescript": "^4.0 || ^5.0" + } +} diff --git a/packages/api/client/axios/tsconfig.json b/packages/api/client/axios/tsconfig.json new file mode 100644 index 0000000..d953a37 --- /dev/null +++ b/packages/api/client/axios/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "ES5", + "module": "commonjs", + "noImplicitAny": true, + "outDir": "dist", + "rootDir": ".", + "lib": [ + "es6", + "dom" + ], + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} diff --git a/packages/api/client/fetch/.gitignore b/packages/api/client/fetch/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/packages/api/client/fetch/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/api/client/fetch/.npmignore b/packages/api/client/fetch/.npmignore new file mode 100644 index 0000000..42061c0 --- /dev/null +++ b/packages/api/client/fetch/.npmignore @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/packages/api/client/fetch/.openapi-generator-ignore b/packages/api/client/fetch/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/packages/api/client/fetch/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/api/client/fetch/.openapi-generator/FILES b/packages/api/client/fetch/.openapi-generator/FILES new file mode 100644 index 0000000..e87cb1e --- /dev/null +++ b/packages/api/client/fetch/.openapi-generator/FILES @@ -0,0 +1,59 @@ +.gitignore +.npmignore +README.md +docs/AuthApi.md +docs/CarApi.md +docs/CarclassApi.md +docs/ConstantsApi.md +docs/DocApi.md +docs/DriverStatsApi.md +docs/ErrorResponse.md +docs/HostedApi.md +docs/IracingAPIResponse.md +docs/IracingCategory.md +docs/IracingDivision.md +docs/IracingEventType.md +docs/IracingServiceMethodDocs.md +docs/IracingServiceMethodParametersDocs.md +docs/LeagueApi.md +docs/LookupApi.md +docs/MemberApi.md +docs/PostAuthRequest.md +docs/ResultsApi.md +docs/SeasonApi.md +docs/SeriesApi.md +docs/StatsApi.md +docs/TeamApi.md +docs/TimeAttackApi.md +docs/TrackApi.md +package.json +src/apis/AuthApi.ts +src/apis/CarApi.ts +src/apis/CarclassApi.ts +src/apis/ConstantsApi.ts +src/apis/DocApi.ts +src/apis/DriverStatsApi.ts +src/apis/HostedApi.ts +src/apis/LeagueApi.ts +src/apis/LookupApi.ts +src/apis/MemberApi.ts +src/apis/ResultsApi.ts +src/apis/SeasonApi.ts +src/apis/SeriesApi.ts +src/apis/StatsApi.ts +src/apis/TeamApi.ts +src/apis/TimeAttackApi.ts +src/apis/TrackApi.ts +src/apis/index.ts +src/index.ts +src/models/ErrorResponse.ts +src/models/IracingAPIResponse.ts +src/models/IracingCategory.ts +src/models/IracingDivision.ts +src/models/IracingEventType.ts +src/models/IracingServiceMethodDocs.ts +src/models/IracingServiceMethodParametersDocs.ts +src/models/PostAuthRequest.ts +src/models/index.ts +src/runtime.ts +tsconfig.json diff --git a/packages/api/client/fetch/.openapi-generator/VERSION b/packages/api/client/fetch/.openapi-generator/VERSION new file mode 100644 index 0000000..6328c54 --- /dev/null +++ b/packages/api/client/fetch/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0 diff --git a/packages/api/client/fetch/README.md b/packages/api/client/fetch/README.md new file mode 100644 index 0000000..b934569 --- /dev/null +++ b/packages/api/client/fetch/README.md @@ -0,0 +1,288 @@ +# @iracing-data/api-client-fetch@0.0.1 + +A TypeScript SDK client for the members-ng.iracing.com API. + +## Usage + +First, install the SDK from npm. + +```bash +npm install @iracing-data/api-client-fetch --save +``` + +Next, try it out. + + +```ts +import { + Configuration, + AuthApi, +} from '@iracing-data/api-client-fetch'; +import type { PostAuthOperationRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new AuthApi(config); + + const body = { + // PostAuthRequest (optional) + post_auth_request: ..., + } satisfies PostAuthOperationRequest; + + try { + const data = await api.postAuth(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + + +## Documentation + +### API Endpoints + +All URIs are relative to *https://members-ng.iracing.com* + +| Class | Method | HTTP request | Description +| ----- | ------ | ------------ | ------------- +*AuthApi* | [**postAuth**](docs/AuthApi.md#postauthoperation) | **POST** /auth | +*CarApi* | [**getCar**](docs/CarApi.md#getcar) | **GET** /data/car/get | +*CarApi* | [**getCarAssets**](docs/CarApi.md#getcarassets) | **GET** /data/car/assets | +*CarclassApi* | [**getCarClass**](docs/CarclassApi.md#getcarclass) | **GET** /data/carclass/get | Gets car classes. +*ConstantsApi* | [**getConstantsCategories**](docs/ConstantsApi.md#getconstantscategories) | **GET** /data/constants/categories | +*ConstantsApi* | [**getConstantsDivisions**](docs/ConstantsApi.md#getconstantsdivisions) | **GET** /data/constants/divisions | +*ConstantsApi* | [**getConstantsEventTypes**](docs/ConstantsApi.md#getconstantseventtypes) | **GET** /data/constants/event_types | +*DocApi* | [**getCarAssetsDocs**](docs/DocApi.md#getcarassetsdocs) | **GET** /data/doc/car/assets | +*DocApi* | [**getCarClassDocs**](docs/DocApi.md#getcarclassdocs) | **GET** /data/doc/carclass | +*DocApi* | [**getCarClassGetDocs**](docs/DocApi.md#getcarclassgetdocs) | **GET** /data/doc/carclass/get | +*DocApi* | [**getCarDocs**](docs/DocApi.md#getcardocs) | **GET** /data/doc/car | +*DocApi* | [**getCarGetDocs**](docs/DocApi.md#getcargetdocs) | **GET** /data/doc/car/get | +*DocApi* | [**getConstantsCategoriesDocs**](docs/DocApi.md#getconstantscategoriesdocs) | **GET** /data/doc/constants/categories | +*DocApi* | [**getConstantsDivisionsDocs**](docs/DocApi.md#getconstantsdivisionsdocs) | **GET** /data/doc/constants/divisions | +*DocApi* | [**getConstantsDocs**](docs/DocApi.md#getconstantsdocs) | **GET** /data/doc/constants | +*DocApi* | [**getConstantsEventTypesDocs**](docs/DocApi.md#getconstantseventtypesdocs) | **GET** /data/doc/constants/event_types | +*DocApi* | [**getDocs**](docs/DocApi.md#getdocs) | **GET** /data/doc | +*DocApi* | [**getDriverStatsByCategoryCategoryDocs**](docs/DocApi.md#getdriverstatsbycategorycategorydocs) | **GET** /data/doc/driver_stats_by_category/{category} | +*DocApi* | [**getDriverStatsByCategoryDocs**](docs/DocApi.md#getdriverstatsbycategorydocs) | **GET** /data/doc/driver_stats_by_category | +*DocApi* | [**getHostedCombinedSessionsDocs**](docs/DocApi.md#gethostedcombinedsessionsdocs) | **GET** /data/doc/hosted/combined_sessions | +*DocApi* | [**getHostedDocs**](docs/DocApi.md#gethosteddocs) | **GET** /data/doc/hosted | +*DocApi* | [**getHostedSessionsDocs**](docs/DocApi.md#gethostedsessionsdocs) | **GET** /data/doc/hosted/sessions | +*DocApi* | [**getLeagueCustomerLeagueSessionsDocs**](docs/DocApi.md#getleaguecustomerleaguesessionsdocs) | **GET** /data/doc/league/cust_league_sessions | +*DocApi* | [**getLeagueDirectoryDocs**](docs/DocApi.md#getleaguedirectorydocs) | **GET** /data/doc/league/directory | +*DocApi* | [**getLeagueDocs**](docs/DocApi.md#getleaguedocs) | **GET** /data/doc/league | +*DocApi* | [**getLeagueGetDocs**](docs/DocApi.md#getleaguegetdocs) | **GET** /data/doc/league/get | +*DocApi* | [**getLeagueGetPointsSystemsDocs**](docs/DocApi.md#getleaguegetpointssystemsdocs) | **GET** /data/doc/league/get_points_systems | +*DocApi* | [**getLeagueMembershipDocs**](docs/DocApi.md#getleaguemembershipdocs) | **GET** /data/doc/league/membership | +*DocApi* | [**getLeagueRosterDocs**](docs/DocApi.md#getleaguerosterdocs) | **GET** /data/doc/league/roster | +*DocApi* | [**getLeagueSeasonSessionsDocs**](docs/DocApi.md#getleagueseasonsessionsdocs) | **GET** /data/doc/league/season_sessions | +*DocApi* | [**getLeagueSeasonStandingsDocs**](docs/DocApi.md#getleagueseasonstandingsdocs) | **GET** /data/doc/league/season_standings | +*DocApi* | [**getLeagueSeasonsDocs**](docs/DocApi.md#getleagueseasonsdocs) | **GET** /data/doc/league/seasons | +*DocApi* | [**getLookupCountriesDocs**](docs/DocApi.md#getlookupcountriesdocs) | **GET** /data/doc/lookup/countries | +*DocApi* | [**getLookupDocs**](docs/DocApi.md#getlookupdocs) | **GET** /data/doc/lookup | +*DocApi* | [**getLookupDriversDocs**](docs/DocApi.md#getlookupdriversdocs) | **GET** /data/doc/lookup/drivers | +*DocApi* | [**getLookupFlairsDocs**](docs/DocApi.md#getlookupflairsdocs) | **GET** /data/doc/lookup/flairs | +*DocApi* | [**getLookupGetDocs**](docs/DocApi.md#getlookupgetdocs) | **GET** /data/doc/lookup/get | +*DocApi* | [**getLookupLicensesDocs**](docs/DocApi.md#getlookuplicensesdocs) | **GET** /data/doc/lookup/licenses | +*DocApi* | [**getMemberAwardInstancesDocs**](docs/DocApi.md#getmemberawardinstancesdocs) | **GET** /data/doc/member/award_instances | +*DocApi* | [**getMemberAwardsDocs**](docs/DocApi.md#getmemberawardsdocs) | **GET** /data/doc/member/awards | +*DocApi* | [**getMemberChartDataDocs**](docs/DocApi.md#getmemberchartdatadocs) | **GET** /data/doc/member/chart_data | +*DocApi* | [**getMemberDocs**](docs/DocApi.md#getmemberdocs) | **GET** /data/doc/member | +*DocApi* | [**getMemberGetDocs**](docs/DocApi.md#getmembergetdocs) | **GET** /data/doc/member/get | +*DocApi* | [**getMemberInfoDocs**](docs/DocApi.md#getmemberinfodocs) | **GET** /data/doc/member/info | +*DocApi* | [**getMemberParticipationCreditsDocs**](docs/DocApi.md#getmemberparticipationcreditsdocs) | **GET** /data/doc/member/participation_credits | +*DocApi* | [**getMemberProfileDocs**](docs/DocApi.md#getmemberprofiledocs) | **GET** /data/doc/member/profile | +*DocApi* | [**getResultsDocs**](docs/DocApi.md#getresultsdocs) | **GET** /data/doc/results | +*DocApi* | [**getResultsEventLogDocs**](docs/DocApi.md#getresultseventlogdocs) | **GET** /data/doc/results/event_log | +*DocApi* | [**getResultsGetDocs**](docs/DocApi.md#getresultsgetdocs) | **GET** /data/doc/results/get | +*DocApi* | [**getResultsLapChartDataDocs**](docs/DocApi.md#getresultslapchartdatadocs) | **GET** /data/doc/results/lap_chart_data | +*DocApi* | [**getResultsLapDataDocs**](docs/DocApi.md#getresultslapdatadocs) | **GET** /data/doc/results/lap_data | +*DocApi* | [**getResultsSearchHostedDocs**](docs/DocApi.md#getresultssearchhosteddocs) | **GET** /data/doc/results/search_hosted | +*DocApi* | [**getResultsSearchSeriesDocs**](docs/DocApi.md#getresultssearchseriesdocs) | **GET** /data/doc/results/search_series | +*DocApi* | [**getResultsSeasonResultsDocs**](docs/DocApi.md#getresultsseasonresultsdocs) | **GET** /data/doc/results/season_results | +*DocApi* | [**getSeasonDocs**](docs/DocApi.md#getseasondocs) | **GET** /data/doc/season | +*DocApi* | [**getSeasonListDocs**](docs/DocApi.md#getseasonlistdocs) | **GET** /data/doc/season/list | +*DocApi* | [**getSeasonRaceGuideDocs**](docs/DocApi.md#getseasonraceguidedocs) | **GET** /data/doc/season/race_guide | +*DocApi* | [**getSeasonSpectatorSubsessionIdsDetailDocs**](docs/DocApi.md#getseasonspectatorsubsessionidsdetaildocs) | **GET** /data/doc/season/spectator_subsessionids_detail | +*DocApi* | [**getSeasonSpectatorSubsessionIdsDocs**](docs/DocApi.md#getseasonspectatorsubsessionidsdocs) | **GET** /data/doc/season/spectator_subsessionids | +*DocApi* | [**getSeriesAssetsDocs**](docs/DocApi.md#getseriesassetsdocs) | **GET** /data/doc/series/assets | +*DocApi* | [**getSeriesDocs**](docs/DocApi.md#getseriesdocs) | **GET** /data/doc/series | +*DocApi* | [**getSeriesGetDocs**](docs/DocApi.md#getseriesgetdocs) | **GET** /data/doc/series/get | +*DocApi* | [**getSeriesPastSeasonsDocs**](docs/DocApi.md#getseriespastseasonsdocs) | **GET** /data/doc/series/past_seasons | +*DocApi* | [**getSeriesSeasonListDocs**](docs/DocApi.md#getseriesseasonlistdocs) | **GET** /data/doc/series/season_list | +*DocApi* | [**getSeriesSeasonScheduleDocs**](docs/DocApi.md#getseriesseasonscheduledocs) | **GET** /data/doc/series/season_schedule | +*DocApi* | [**getSeriesSeasonsDocs**](docs/DocApi.md#getseriesseasonsdocs) | **GET** /data/doc/series/seasons | +*DocApi* | [**getSeriesStatsSeriesDocs**](docs/DocApi.md#getseriesstatsseriesdocs) | **GET** /data/doc/series/stats_series | +*DocApi* | [**getStatsDocs**](docs/DocApi.md#getstatsdocs) | **GET** /data/doc/stats | +*DocApi* | [**getStatsMemberBestsDocs**](docs/DocApi.md#getstatsmemberbestsdocs) | **GET** /data/doc/stats/member_bests | +*DocApi* | [**getStatsMemberCareerDocs**](docs/DocApi.md#getstatsmembercareerdocs) | **GET** /data/doc/stats/member_career | +*DocApi* | [**getStatsMemberDivisionDocs**](docs/DocApi.md#getstatsmemberdivisiondocs) | **GET** /data/doc/stats/member_division | +*DocApi* | [**getStatsMemberRecapDocs**](docs/DocApi.md#getstatsmemberrecapdocs) | **GET** /data/doc/stats/member_recap | +*DocApi* | [**getStatsMemberRecentRacesDocs**](docs/DocApi.md#getstatsmemberrecentracesdocs) | **GET** /data/doc/stats/member_recent_races | +*DocApi* | [**getStatsMemberSummaryDocs**](docs/DocApi.md#getstatsmembersummarydocs) | **GET** /data/doc/stats/member_summary | +*DocApi* | [**getStatsMemberYearlyDocs**](docs/DocApi.md#getstatsmemberyearlydocs) | **GET** /data/doc/stats/member_yearly | +*DocApi* | [**getStatsSeasonDriverStandingsDocs**](docs/DocApi.md#getstatsseasondriverstandingsdocs) | **GET** /data/doc/stats/season_driver_standings | +*DocApi* | [**getStatsSeasonQualifyResultsDocs**](docs/DocApi.md#getstatsseasonqualifyresultsdocs) | **GET** /data/doc/stats/season_qualify_results | +*DocApi* | [**getStatsSeasonSupersessionStandingsDocs**](docs/DocApi.md#getstatsseasonsupersessionstandingsdocs) | **GET** /data/doc/stats/season_supersession_standings | +*DocApi* | [**getStatsSeasonTTResultsDocs**](docs/DocApi.md#getstatsseasonttresultsdocs) | **GET** /data/doc/stats/season_tt_results | +*DocApi* | [**getStatsSeasonTTStandingsDocs**](docs/DocApi.md#getstatsseasonttstandingsdocs) | **GET** /data/doc/stats/season_tt_standings | +*DocApi* | [**getStatsSeasonTeamStandingsDocs**](docs/DocApi.md#getstatsseasonteamstandingsdocs) | **GET** /data/doc/stats/season_team_standings | +*DocApi* | [**getStatsWorldRecordsDocs**](docs/DocApi.md#getstatsworldrecordsdocs) | **GET** /data/doc/stats/world_records | +*DocApi* | [**getTeamDocs**](docs/DocApi.md#getteamdocs) | **GET** /data/doc/team | +*DocApi* | [**getTeamGetDocs**](docs/DocApi.md#getteamgetdocs) | **GET** /data/doc/team/get | +*DocApi* | [**getTeamMembershipDocs**](docs/DocApi.md#getteammembershipdocs) | **GET** /data/doc/team/membership | +*DocApi* | [**getTimeAttackDocs**](docs/DocApi.md#gettimeattackdocs) | **GET** /data/doc/time_attack | +*DocApi* | [**getTimeAttackMemberSeasonResultsDocs**](docs/DocApi.md#gettimeattackmemberseasonresultsdocs) | **GET** /data/doc/time_attack/member_season_results | +*DocApi* | [**getTrackAssetsDocs**](docs/DocApi.md#gettrackassetsdocs) | **GET** /data/doc/track/assets | +*DocApi* | [**getTrackDocs**](docs/DocApi.md#gettrackdocs) | **GET** /data/doc/track | +*DocApi* | [**getTrackGetDocs**](docs/DocApi.md#gettrackgetdocs) | **GET** /data/doc/track/get | +*DriverStatsApi* | [**getDriverStatsByCategory**](docs/DriverStatsApi.md#getdriverstatsbycategory) | **GET** /data/driver_stats_by_category/{category} | +*HostedApi* | [**getHostedCombinedSessions**](docs/HostedApi.md#gethostedcombinedsessions) | **GET** /data/hosted/combined_sessions | +*HostedApi* | [**getHostedSessions**](docs/HostedApi.md#gethostedsessions) | **GET** /data/hosted/sessions | +*LeagueApi* | [**getLeague**](docs/LeagueApi.md#getleague) | **GET** /data/league/get | +*LeagueApi* | [**getLeagueCustomerLeagueSessions**](docs/LeagueApi.md#getleaguecustomerleaguesessions) | **GET** /data/league/cust_league_sessions | +*LeagueApi* | [**getLeagueDirectory**](docs/LeagueApi.md#getleaguedirectory) | **GET** /data/league/directory | +*LeagueApi* | [**getLeagueMembership**](docs/LeagueApi.md#getleaguemembership) | **GET** /data/league/membership | +*LeagueApi* | [**getLeaguePointsSystems**](docs/LeagueApi.md#getleaguepointssystems) | **GET** /data/league/get_points_systems | +*LeagueApi* | [**getLeagueRoster**](docs/LeagueApi.md#getleagueroster) | **GET** /data/league/roster | +*LeagueApi* | [**getLeagueSeasonSessions**](docs/LeagueApi.md#getleagueseasonsessions) | **GET** /data/league/season_sessions | +*LeagueApi* | [**getLeagueSeasonStandings**](docs/LeagueApi.md#getleagueseasonstandings) | **GET** /data/league/season_standings | +*LeagueApi* | [**getLeagueSeasons**](docs/LeagueApi.md#getleagueseasons) | **GET** /data/league/seasons | +*LookupApi* | [**getLookup**](docs/LookupApi.md#getlookup) | **GET** /data/lookup/get | +*LookupApi* | [**getLookupCountries**](docs/LookupApi.md#getlookupcountries) | **GET** /data/lookup/countries | +*LookupApi* | [**getLookupDrivers**](docs/LookupApi.md#getlookupdrivers) | **GET** /data/lookup/drivers | +*LookupApi* | [**getLookupFlairs**](docs/LookupApi.md#getlookupflairs) | **GET** /data/lookup/flairs | +*LookupApi* | [**getLookupLicenses**](docs/LookupApi.md#getlookuplicenses) | **GET** /data/lookup/licenses | +*MemberApi* | [**getMember**](docs/MemberApi.md#getmember) | **GET** /data/member/get | +*MemberApi* | [**getMemberAwardInstances**](docs/MemberApi.md#getmemberawardinstances) | **GET** /data/member/award_instances | +*MemberApi* | [**getMemberAwards**](docs/MemberApi.md#getmemberawards) | **GET** /data/member/awards | +*MemberApi* | [**getMemberChartData**](docs/MemberApi.md#getmemberchartdata) | **GET** /data/member/chart_data | +*MemberApi* | [**getMemberInfo**](docs/MemberApi.md#getmemberinfo) | **GET** /data/member/info | +*MemberApi* | [**getMemberParticipationCredits**](docs/MemberApi.md#getmemberparticipationcredits) | **GET** /data/member/participation_credits | +*MemberApi* | [**getMemberProfile**](docs/MemberApi.md#getmemberprofile) | **GET** /data/member/profile | Gets a requested user\'s profile. +*ResultsApi* | [**getResults**](docs/ResultsApi.md#getresults) | **GET** /data/results/get | +*ResultsApi* | [**getResultsEventLog**](docs/ResultsApi.md#getresultseventlog) | **GET** /data/results/event_log | +*ResultsApi* | [**getResultsLapChartData**](docs/ResultsApi.md#getresultslapchartdata) | **GET** /data/results/lap_chart_data | +*ResultsApi* | [**getResultsLapData**](docs/ResultsApi.md#getresultslapdata) | **GET** /data/results/lap_data | +*ResultsApi* | [**getResultsSearchHosted**](docs/ResultsApi.md#getresultssearchhosted) | **GET** /data/results/search_hosted | +*ResultsApi* | [**getResultsSearchSeries**](docs/ResultsApi.md#getresultssearchseries) | **GET** /data/results/search_series | +*ResultsApi* | [**getResultsSeasonResults**](docs/ResultsApi.md#getresultsseasonresults) | **GET** /data/results/season_results | +*SeasonApi* | [**getSeasonList**](docs/SeasonApi.md#getseasonlist) | **GET** /data/season/list | +*SeasonApi* | [**getSeasonRaceGuide**](docs/SeasonApi.md#getseasonraceguide) | **GET** /data/season/race_guide | +*SeasonApi* | [**getSeasonSpectatorSubsessionIds**](docs/SeasonApi.md#getseasonspectatorsubsessionids) | **GET** /data/season/spectator_subsessionids | +*SeasonApi* | [**getSeasonSpectatorSubsessionIdsDetail**](docs/SeasonApi.md#getseasonspectatorsubsessionidsdetail) | **GET** /data/season/spectator_subsessionids_detail | +*SeriesApi* | [**getSeries**](docs/SeriesApi.md#getseries) | **GET** /data/series/get | +*SeriesApi* | [**getSeriesAssets**](docs/SeriesApi.md#getseriesassets) | **GET** /data/series/assets | +*SeriesApi* | [**getSeriesPastSeasons**](docs/SeriesApi.md#getseriespastseasons) | **GET** /data/series/past_seasons | +*SeriesApi* | [**getSeriesSeasonList**](docs/SeriesApi.md#getseriesseasonlist) | **GET** /data/series/season_list | +*SeriesApi* | [**getSeriesSeasonSchedule**](docs/SeriesApi.md#getseriesseasonschedule) | **GET** /data/series/season_schedule | +*SeriesApi* | [**getSeriesSeasons**](docs/SeriesApi.md#getseriesseasons) | **GET** /data/series/seasons | +*SeriesApi* | [**getSeriesStatsSeries**](docs/SeriesApi.md#getseriesstatsseries) | **GET** /data/series/stats_series | +*StatsApi* | [**getStatsMemberBests**](docs/StatsApi.md#getstatsmemberbests) | **GET** /data/stats/member_bests | +*StatsApi* | [**getStatsMemberCareer**](docs/StatsApi.md#getstatsmembercareer) | **GET** /data/stats/member_career | +*StatsApi* | [**getStatsMemberDivision**](docs/StatsApi.md#getstatsmemberdivision) | **GET** /data/stats/member_division | +*StatsApi* | [**getStatsMemberRecap**](docs/StatsApi.md#getstatsmemberrecap) | **GET** /data/stats/member_recap | +*StatsApi* | [**getStatsMemberRecentRaces**](docs/StatsApi.md#getstatsmemberrecentraces) | **GET** /data/stats/member_recent_races | +*StatsApi* | [**getStatsMemberSummary**](docs/StatsApi.md#getstatsmembersummary) | **GET** /data/stats/member_summary | +*StatsApi* | [**getStatsMemberYearly**](docs/StatsApi.md#getstatsmemberyearly) | **GET** /data/stats/member_yearly | +*StatsApi* | [**getStatsSeasonDriverStandings**](docs/StatsApi.md#getstatsseasondriverstandings) | **GET** /data/stats/season_driver_standings | +*StatsApi* | [**getStatsSeasonQualifyResults**](docs/StatsApi.md#getstatsseasonqualifyresults) | **GET** /data/stats/season_qualify_results | +*StatsApi* | [**getStatsSeasonSupersessionStandings**](docs/StatsApi.md#getstatsseasonsupersessionstandings) | **GET** /data/stats/season_supersession_standings | +*StatsApi* | [**getStatsSeasonTeamStandings**](docs/StatsApi.md#getstatsseasonteamstandings) | **GET** /data/stats/season_team_standings | +*StatsApi* | [**getStatsSeasonTimeTrialResults**](docs/StatsApi.md#getstatsseasontimetrialresults) | **GET** /data/stats/season_time_trial_results | +*StatsApi* | [**getStatsSeasonTimeTrialStandings**](docs/StatsApi.md#getstatsseasontimetrialstandings) | **GET** /data/stats/season_time_trial_standings | +*StatsApi* | [**getStatsWorldRecords**](docs/StatsApi.md#getstatsworldrecords) | **GET** /data/stats/world_records | +*TeamApi* | [**getTeam**](docs/TeamApi.md#getteam) | **GET** /data/team/get | +*TeamApi* | [**getTeamMembership**](docs/TeamApi.md#getteammembership) | **GET** /data/team/membership | +*TimeAttackApi* | [**getTimeAttackMemberSeasonResults**](docs/TimeAttackApi.md#gettimeattackmemberseasonresults) | **GET** /data/time_attack/member_season_results | +*TrackApi* | [**getTrack**](docs/TrackApi.md#gettrack) | **GET** /data/track/get | +*TrackApi* | [**getTrackAssets**](docs/TrackApi.md#gettrackassets) | **GET** /data/track/assets | + + +### Models + +- [ErrorResponse](docs/ErrorResponse.md) +- [IracingAPIResponse](docs/IracingAPIResponse.md) +- [IracingCategory](docs/IracingCategory.md) +- [IracingDivision](docs/IracingDivision.md) +- [IracingEventType](docs/IracingEventType.md) +- [IracingServiceMethodDocs](docs/IracingServiceMethodDocs.md) +- [IracingServiceMethodParametersDocs](docs/IracingServiceMethodParametersDocs.md) +- [PostAuthRequest](docs/PostAuthRequest.md) + +### Authorization + + +Authentication schemes defined for the API: + +#### bearerAuth + + +- **Type**: HTTP Bearer Token authentication (JWT) + +#### oAuth2 accessCode + + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: https://oauth.iracing.com/oauth2/authorize +- **Scopes**: + - `iracing.auth`: Authorization for iRacing services. + - `iracing.profile`: Access to the iRacing profile. + +## About + +This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/) +and is automatically generated by the +[OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: `0.0.1` +- Package version: `0.0.1` +- Generator version: `7.17.0` +- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen` + +The generated npm module supports the following: + +- Environments + * Node.js + * Webpack + * Browserify +- Language levels + * ES5 - you must have a Promises/A+ library installed + * ES6 +- Module systems + * CommonJS + * ES6 module system + + +## Development + +### Building + +To build the TypeScript source code, you need to have Node.js and npm installed. +After cloning the repository, navigate to the project directory and run: + +```bash +npm install +npm run build +``` + +### Publishing + +Once you've built the package, you can publish it to npm: + +```bash +npm publish +``` + +## License + +[]() diff --git a/packages/api/client/fetch/docs/AuthApi.md b/packages/api/client/fetch/docs/AuthApi.md new file mode 100644 index 0000000..77a8472 --- /dev/null +++ b/packages/api/client/fetch/docs/AuthApi.md @@ -0,0 +1,73 @@ +# AuthApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**postAuth**](AuthApi.md#postauthoperation) | **POST** /auth | | + + + +## postAuth + +> postAuth(post_auth_request) + + + +### Example + +```ts +import { + Configuration, + AuthApi, +} from '@iracing-data/api-client-fetch'; +import type { PostAuthOperationRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new AuthApi(config); + + const body = { + // PostAuthRequest (optional) + post_auth_request: ..., + } satisfies PostAuthOperationRequest; + + try { + const data = await api.postAuth(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **post_auth_request** | [PostAuthRequest](PostAuthRequest.md) | | [Optional] | + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: Not defined + + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/CarApi.md b/packages/api/client/fetch/docs/CarApi.md new file mode 100644 index 0000000..964a9a5 --- /dev/null +++ b/packages/api/client/fetch/docs/CarApi.md @@ -0,0 +1,140 @@ +# CarApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getCar**](CarApi.md#getcar) | **GET** /data/car/get | | +| [**getCarAssets**](CarApi.md#getcarassets) | **GET** /data/car/assets | | + + + +## getCar + +> IracingAPIResponse getCar() + + + +### Example + +```ts +import { + Configuration, + CarApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CarApi(config); + + try { + const data = await api.getCar(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCarAssets + +> IracingAPIResponse getCarAssets() + + + +image paths are relative to https://images-static.iracing.com/ + +### Example + +```ts +import { + Configuration, + CarApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarAssetsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CarApi(config); + + try { + const data = await api.getCarAssets(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/CarclassApi.md b/packages/api/client/fetch/docs/CarclassApi.md new file mode 100644 index 0000000..e3271f6 --- /dev/null +++ b/packages/api/client/fetch/docs/CarclassApi.md @@ -0,0 +1,73 @@ +# CarclassApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getCarClass**](CarclassApi.md#getcarclass) | **GET** /data/carclass/get | Gets car classes. | + + + +## getCarClass + +> IracingAPIResponse getCarClass() + +Gets car classes. + +### Example + +```ts +import { + Configuration, + CarclassApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarClassRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new CarclassApi(config); + + try { + const data = await api.getCarClass(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/ConstantsApi.md b/packages/api/client/fetch/docs/ConstantsApi.md new file mode 100644 index 0000000..5712a59 --- /dev/null +++ b/packages/api/client/fetch/docs/ConstantsApi.md @@ -0,0 +1,209 @@ +# ConstantsApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getConstantsCategories**](ConstantsApi.md#getconstantscategories) | **GET** /data/constants/categories | | +| [**getConstantsDivisions**](ConstantsApi.md#getconstantsdivisions) | **GET** /data/constants/divisions | | +| [**getConstantsEventTypes**](ConstantsApi.md#getconstantseventtypes) | **GET** /data/constants/event_types | | + + + +## getConstantsCategories + +> IracingAPIResponse getConstantsCategories() + + + +Constant; returned directly as an array of objects + +### Example + +```ts +import { + Configuration, + ConstantsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsCategoriesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ConstantsApi(config); + + try { + const data = await api.getConstantsCategories(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getConstantsDivisions + +> IracingAPIResponse getConstantsDivisions() + + + +Constant; returned directly as an array of objects + +### Example + +```ts +import { + Configuration, + ConstantsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsDivisionsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ConstantsApi(config); + + try { + const data = await api.getConstantsDivisions(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getConstantsEventTypes + +> IracingAPIResponse getConstantsEventTypes() + + + +Constant; returned directly as an array of objects + +### Example + +```ts +import { + Configuration, + ConstantsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsEventTypesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ConstantsApi(config); + + try { + const data = await api.getConstantsEventTypes(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/DocApi.md b/packages/api/client/fetch/docs/DocApi.md new file mode 100644 index 0000000..cd5f61f --- /dev/null +++ b/packages/api/client/fetch/docs/DocApi.md @@ -0,0 +1,5245 @@ +# DocApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getCarAssetsDocs**](DocApi.md#getcarassetsdocs) | **GET** /data/doc/car/assets | | +| [**getCarClassDocs**](DocApi.md#getcarclassdocs) | **GET** /data/doc/carclass | | +| [**getCarClassGetDocs**](DocApi.md#getcarclassgetdocs) | **GET** /data/doc/carclass/get | | +| [**getCarDocs**](DocApi.md#getcardocs) | **GET** /data/doc/car | | +| [**getCarGetDocs**](DocApi.md#getcargetdocs) | **GET** /data/doc/car/get | | +| [**getConstantsCategoriesDocs**](DocApi.md#getconstantscategoriesdocs) | **GET** /data/doc/constants/categories | | +| [**getConstantsDivisionsDocs**](DocApi.md#getconstantsdivisionsdocs) | **GET** /data/doc/constants/divisions | | +| [**getConstantsDocs**](DocApi.md#getconstantsdocs) | **GET** /data/doc/constants | | +| [**getConstantsEventTypesDocs**](DocApi.md#getconstantseventtypesdocs) | **GET** /data/doc/constants/event_types | | +| [**getDocs**](DocApi.md#getdocs) | **GET** /data/doc | | +| [**getDriverStatsByCategoryCategoryDocs**](DocApi.md#getdriverstatsbycategorycategorydocs) | **GET** /data/doc/driver_stats_by_category/{category} | | +| [**getDriverStatsByCategoryDocs**](DocApi.md#getdriverstatsbycategorydocs) | **GET** /data/doc/driver_stats_by_category | | +| [**getHostedCombinedSessionsDocs**](DocApi.md#gethostedcombinedsessionsdocs) | **GET** /data/doc/hosted/combined_sessions | | +| [**getHostedDocs**](DocApi.md#gethosteddocs) | **GET** /data/doc/hosted | | +| [**getHostedSessionsDocs**](DocApi.md#gethostedsessionsdocs) | **GET** /data/doc/hosted/sessions | | +| [**getLeagueCustomerLeagueSessionsDocs**](DocApi.md#getleaguecustomerleaguesessionsdocs) | **GET** /data/doc/league/cust_league_sessions | | +| [**getLeagueDirectoryDocs**](DocApi.md#getleaguedirectorydocs) | **GET** /data/doc/league/directory | | +| [**getLeagueDocs**](DocApi.md#getleaguedocs) | **GET** /data/doc/league | | +| [**getLeagueGetDocs**](DocApi.md#getleaguegetdocs) | **GET** /data/doc/league/get | | +| [**getLeagueGetPointsSystemsDocs**](DocApi.md#getleaguegetpointssystemsdocs) | **GET** /data/doc/league/get_points_systems | | +| [**getLeagueMembershipDocs**](DocApi.md#getleaguemembershipdocs) | **GET** /data/doc/league/membership | | +| [**getLeagueRosterDocs**](DocApi.md#getleaguerosterdocs) | **GET** /data/doc/league/roster | | +| [**getLeagueSeasonSessionsDocs**](DocApi.md#getleagueseasonsessionsdocs) | **GET** /data/doc/league/season_sessions | | +| [**getLeagueSeasonStandingsDocs**](DocApi.md#getleagueseasonstandingsdocs) | **GET** /data/doc/league/season_standings | | +| [**getLeagueSeasonsDocs**](DocApi.md#getleagueseasonsdocs) | **GET** /data/doc/league/seasons | | +| [**getLookupCountriesDocs**](DocApi.md#getlookupcountriesdocs) | **GET** /data/doc/lookup/countries | | +| [**getLookupDocs**](DocApi.md#getlookupdocs) | **GET** /data/doc/lookup | | +| [**getLookupDriversDocs**](DocApi.md#getlookupdriversdocs) | **GET** /data/doc/lookup/drivers | | +| [**getLookupFlairsDocs**](DocApi.md#getlookupflairsdocs) | **GET** /data/doc/lookup/flairs | | +| [**getLookupGetDocs**](DocApi.md#getlookupgetdocs) | **GET** /data/doc/lookup/get | | +| [**getLookupLicensesDocs**](DocApi.md#getlookuplicensesdocs) | **GET** /data/doc/lookup/licenses | | +| [**getMemberAwardInstancesDocs**](DocApi.md#getmemberawardinstancesdocs) | **GET** /data/doc/member/award_instances | | +| [**getMemberAwardsDocs**](DocApi.md#getmemberawardsdocs) | **GET** /data/doc/member/awards | | +| [**getMemberChartDataDocs**](DocApi.md#getmemberchartdatadocs) | **GET** /data/doc/member/chart_data | | +| [**getMemberDocs**](DocApi.md#getmemberdocs) | **GET** /data/doc/member | | +| [**getMemberGetDocs**](DocApi.md#getmembergetdocs) | **GET** /data/doc/member/get | | +| [**getMemberInfoDocs**](DocApi.md#getmemberinfodocs) | **GET** /data/doc/member/info | | +| [**getMemberParticipationCreditsDocs**](DocApi.md#getmemberparticipationcreditsdocs) | **GET** /data/doc/member/participation_credits | | +| [**getMemberProfileDocs**](DocApi.md#getmemberprofiledocs) | **GET** /data/doc/member/profile | | +| [**getResultsDocs**](DocApi.md#getresultsdocs) | **GET** /data/doc/results | | +| [**getResultsEventLogDocs**](DocApi.md#getresultseventlogdocs) | **GET** /data/doc/results/event_log | | +| [**getResultsGetDocs**](DocApi.md#getresultsgetdocs) | **GET** /data/doc/results/get | | +| [**getResultsLapChartDataDocs**](DocApi.md#getresultslapchartdatadocs) | **GET** /data/doc/results/lap_chart_data | | +| [**getResultsLapDataDocs**](DocApi.md#getresultslapdatadocs) | **GET** /data/doc/results/lap_data | | +| [**getResultsSearchHostedDocs**](DocApi.md#getresultssearchhosteddocs) | **GET** /data/doc/results/search_hosted | | +| [**getResultsSearchSeriesDocs**](DocApi.md#getresultssearchseriesdocs) | **GET** /data/doc/results/search_series | | +| [**getResultsSeasonResultsDocs**](DocApi.md#getresultsseasonresultsdocs) | **GET** /data/doc/results/season_results | | +| [**getSeasonDocs**](DocApi.md#getseasondocs) | **GET** /data/doc/season | | +| [**getSeasonListDocs**](DocApi.md#getseasonlistdocs) | **GET** /data/doc/season/list | | +| [**getSeasonRaceGuideDocs**](DocApi.md#getseasonraceguidedocs) | **GET** /data/doc/season/race_guide | | +| [**getSeasonSpectatorSubsessionIdsDetailDocs**](DocApi.md#getseasonspectatorsubsessionidsdetaildocs) | **GET** /data/doc/season/spectator_subsessionids_detail | | +| [**getSeasonSpectatorSubsessionIdsDocs**](DocApi.md#getseasonspectatorsubsessionidsdocs) | **GET** /data/doc/season/spectator_subsessionids | | +| [**getSeriesAssetsDocs**](DocApi.md#getseriesassetsdocs) | **GET** /data/doc/series/assets | | +| [**getSeriesDocs**](DocApi.md#getseriesdocs) | **GET** /data/doc/series | | +| [**getSeriesGetDocs**](DocApi.md#getseriesgetdocs) | **GET** /data/doc/series/get | | +| [**getSeriesPastSeasonsDocs**](DocApi.md#getseriespastseasonsdocs) | **GET** /data/doc/series/past_seasons | | +| [**getSeriesSeasonListDocs**](DocApi.md#getseriesseasonlistdocs) | **GET** /data/doc/series/season_list | | +| [**getSeriesSeasonScheduleDocs**](DocApi.md#getseriesseasonscheduledocs) | **GET** /data/doc/series/season_schedule | | +| [**getSeriesSeasonsDocs**](DocApi.md#getseriesseasonsdocs) | **GET** /data/doc/series/seasons | | +| [**getSeriesStatsSeriesDocs**](DocApi.md#getseriesstatsseriesdocs) | **GET** /data/doc/series/stats_series | | +| [**getStatsDocs**](DocApi.md#getstatsdocs) | **GET** /data/doc/stats | | +| [**getStatsMemberBestsDocs**](DocApi.md#getstatsmemberbestsdocs) | **GET** /data/doc/stats/member_bests | | +| [**getStatsMemberCareerDocs**](DocApi.md#getstatsmembercareerdocs) | **GET** /data/doc/stats/member_career | | +| [**getStatsMemberDivisionDocs**](DocApi.md#getstatsmemberdivisiondocs) | **GET** /data/doc/stats/member_division | | +| [**getStatsMemberRecapDocs**](DocApi.md#getstatsmemberrecapdocs) | **GET** /data/doc/stats/member_recap | | +| [**getStatsMemberRecentRacesDocs**](DocApi.md#getstatsmemberrecentracesdocs) | **GET** /data/doc/stats/member_recent_races | | +| [**getStatsMemberSummaryDocs**](DocApi.md#getstatsmembersummarydocs) | **GET** /data/doc/stats/member_summary | | +| [**getStatsMemberYearlyDocs**](DocApi.md#getstatsmemberyearlydocs) | **GET** /data/doc/stats/member_yearly | | +| [**getStatsSeasonDriverStandingsDocs**](DocApi.md#getstatsseasondriverstandingsdocs) | **GET** /data/doc/stats/season_driver_standings | | +| [**getStatsSeasonQualifyResultsDocs**](DocApi.md#getstatsseasonqualifyresultsdocs) | **GET** /data/doc/stats/season_qualify_results | | +| [**getStatsSeasonSupersessionStandingsDocs**](DocApi.md#getstatsseasonsupersessionstandingsdocs) | **GET** /data/doc/stats/season_supersession_standings | | +| [**getStatsSeasonTTResultsDocs**](DocApi.md#getstatsseasonttresultsdocs) | **GET** /data/doc/stats/season_tt_results | | +| [**getStatsSeasonTTStandingsDocs**](DocApi.md#getstatsseasonttstandingsdocs) | **GET** /data/doc/stats/season_tt_standings | | +| [**getStatsSeasonTeamStandingsDocs**](DocApi.md#getstatsseasonteamstandingsdocs) | **GET** /data/doc/stats/season_team_standings | | +| [**getStatsWorldRecordsDocs**](DocApi.md#getstatsworldrecordsdocs) | **GET** /data/doc/stats/world_records | | +| [**getTeamDocs**](DocApi.md#getteamdocs) | **GET** /data/doc/team | | +| [**getTeamGetDocs**](DocApi.md#getteamgetdocs) | **GET** /data/doc/team/get | | +| [**getTeamMembershipDocs**](DocApi.md#getteammembershipdocs) | **GET** /data/doc/team/membership | | +| [**getTimeAttackDocs**](DocApi.md#gettimeattackdocs) | **GET** /data/doc/time_attack | | +| [**getTimeAttackMemberSeasonResultsDocs**](DocApi.md#gettimeattackmemberseasonresultsdocs) | **GET** /data/doc/time_attack/member_season_results | | +| [**getTrackAssetsDocs**](DocApi.md#gettrackassetsdocs) | **GET** /data/doc/track/assets | | +| [**getTrackDocs**](DocApi.md#gettrackdocs) | **GET** /data/doc/track | | +| [**getTrackGetDocs**](DocApi.md#gettrackgetdocs) | **GET** /data/doc/track/get | | + + + +## getCarAssetsDocs + +> IracingServiceMethodDocs getCarAssetsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarAssetsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getCarAssetsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCarClassDocs + +> { [key: string]: IracingServiceMethodDocs; } getCarClassDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarClassDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getCarClassDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCarClassGetDocs + +> IracingServiceMethodDocs getCarClassGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarClassGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getCarClassGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCarDocs + +> { [key: string]: IracingServiceMethodDocs; } getCarDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getCarDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getCarGetDocs + +> IracingServiceMethodDocs getCarGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetCarGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getCarGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getConstantsCategoriesDocs + +> IracingServiceMethodDocs getConstantsCategoriesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsCategoriesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getConstantsCategoriesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getConstantsDivisionsDocs + +> IracingServiceMethodDocs getConstantsDivisionsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsDivisionsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getConstantsDivisionsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getConstantsDocs + +> { [key: string]: IracingServiceMethodDocs; } getConstantsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getConstantsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getConstantsEventTypesDocs + +> IracingServiceMethodDocs getConstantsEventTypesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetConstantsEventTypesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getConstantsEventTypesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getDocs + +> { [key: string]: { [key: string]: IracingServiceMethodDocs; }; } getDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getDriverStatsByCategoryCategoryDocs + +> IracingServiceMethodDocs getDriverStatsByCategoryCategoryDocs(category) + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetDriverStatsByCategoryCategoryDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + const body = { + // IracingCategory | Racing category. + category: ..., + } satisfies GetDriverStatsByCategoryCategoryDocsRequest; + + try { + const data = await api.getDriverStatsByCategoryCategoryDocs(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **category** | `IracingCategory` | Racing category. | [Defaults to `undefined`] [Enum: oval, road, dirt_road, dirt_oval, sports_car, formula_car] | + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getDriverStatsByCategoryDocs + +> { [key: string]: IracingServiceMethodDocs; } getDriverStatsByCategoryDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetDriverStatsByCategoryDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getDriverStatsByCategoryDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getHostedCombinedSessionsDocs + +> IracingServiceMethodDocs getHostedCombinedSessionsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetHostedCombinedSessionsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getHostedCombinedSessionsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getHostedDocs + +> { [key: string]: IracingServiceMethodDocs; } getHostedDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetHostedDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getHostedDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getHostedSessionsDocs + +> IracingServiceMethodDocs getHostedSessionsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetHostedSessionsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getHostedSessionsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueCustomerLeagueSessionsDocs + +> IracingServiceMethodDocs getLeagueCustomerLeagueSessionsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueCustomerLeagueSessionsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueCustomerLeagueSessionsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueDirectoryDocs + +> IracingServiceMethodDocs getLeagueDirectoryDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueDirectoryDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueDirectoryDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueDocs + +> { [key: string]: IracingServiceMethodDocs; } getLeagueDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueGetDocs + +> IracingServiceMethodDocs getLeagueGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueGetPointsSystemsDocs + +> IracingServiceMethodDocs getLeagueGetPointsSystemsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueGetPointsSystemsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueGetPointsSystemsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueMembershipDocs + +> IracingServiceMethodDocs getLeagueMembershipDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueMembershipDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueMembershipDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueRosterDocs + +> IracingServiceMethodDocs getLeagueRosterDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueRosterDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueRosterDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueSeasonSessionsDocs + +> IracingServiceMethodDocs getLeagueSeasonSessionsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueSeasonSessionsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueSeasonSessionsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueSeasonStandingsDocs + +> IracingServiceMethodDocs getLeagueSeasonStandingsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueSeasonStandingsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueSeasonStandingsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueSeasonsDocs + +> IracingServiceMethodDocs getLeagueSeasonsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueSeasonsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLeagueSeasonsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupCountriesDocs + +> IracingServiceMethodDocs getLookupCountriesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupCountriesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLookupCountriesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupDocs + +> { [key: string]: IracingServiceMethodDocs; } getLookupDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLookupDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupDriversDocs + +> IracingServiceMethodDocs getLookupDriversDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupDriversDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLookupDriversDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupFlairsDocs + +> IracingServiceMethodDocs getLookupFlairsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupFlairsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLookupFlairsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupGetDocs + +> IracingServiceMethodDocs getLookupGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLookupGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupLicensesDocs + +> IracingServiceMethodDocs getLookupLicensesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupLicensesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getLookupLicensesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberAwardInstancesDocs + +> IracingServiceMethodDocs getMemberAwardInstancesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberAwardInstancesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberAwardInstancesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberAwardsDocs + +> IracingServiceMethodDocs getMemberAwardsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberAwardsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberAwardsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberChartDataDocs + +> IracingServiceMethodDocs getMemberChartDataDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberChartDataDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberChartDataDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberDocs + +> { [key: string]: IracingServiceMethodDocs; } getMemberDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberGetDocs + +> IracingServiceMethodDocs getMemberGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberInfoDocs + +> IracingServiceMethodDocs getMemberInfoDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberInfoDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberInfoDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberParticipationCreditsDocs + +> IracingServiceMethodDocs getMemberParticipationCreditsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberParticipationCreditsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberParticipationCreditsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberProfileDocs + +> IracingServiceMethodDocs getMemberProfileDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberProfileDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getMemberProfileDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsDocs + +> { [key: string]: IracingServiceMethodDocs; } getResultsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsEventLogDocs + +> IracingServiceMethodDocs getResultsEventLogDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsEventLogDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsEventLogDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsGetDocs + +> IracingServiceMethodDocs getResultsGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsLapChartDataDocs + +> IracingServiceMethodDocs getResultsLapChartDataDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsLapChartDataDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsLapChartDataDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsLapDataDocs + +> IracingServiceMethodDocs getResultsLapDataDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsLapDataDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsLapDataDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsSearchHostedDocs + +> IracingServiceMethodDocs getResultsSearchHostedDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsSearchHostedDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsSearchHostedDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsSearchSeriesDocs + +> IracingServiceMethodDocs getResultsSearchSeriesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsSearchSeriesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsSearchSeriesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsSeasonResultsDocs + +> IracingServiceMethodDocs getResultsSeasonResultsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsSeasonResultsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getResultsSeasonResultsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonDocs + +> { [key: string]: IracingServiceMethodDocs; } getSeasonDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeasonDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonListDocs + +> IracingServiceMethodDocs getSeasonListDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonListDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeasonListDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonRaceGuideDocs + +> IracingServiceMethodDocs getSeasonRaceGuideDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonRaceGuideDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeasonRaceGuideDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonSpectatorSubsessionIdsDetailDocs + +> IracingServiceMethodDocs getSeasonSpectatorSubsessionIdsDetailDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonSpectatorSubsessionIdsDetailDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeasonSpectatorSubsessionIdsDetailDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonSpectatorSubsessionIdsDocs + +> IracingServiceMethodDocs getSeasonSpectatorSubsessionIdsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonSpectatorSubsessionIdsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeasonSpectatorSubsessionIdsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesAssetsDocs + +> IracingServiceMethodDocs getSeriesAssetsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesAssetsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesAssetsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesDocs + +> { [key: string]: IracingServiceMethodDocs; } getSeriesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesGetDocs + +> IracingServiceMethodDocs getSeriesGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesPastSeasonsDocs + +> IracingServiceMethodDocs getSeriesPastSeasonsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesPastSeasonsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesPastSeasonsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesSeasonListDocs + +> IracingServiceMethodDocs getSeriesSeasonListDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesSeasonListDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesSeasonListDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesSeasonScheduleDocs + +> IracingServiceMethodDocs getSeriesSeasonScheduleDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesSeasonScheduleDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesSeasonScheduleDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesSeasonsDocs + +> IracingServiceMethodDocs getSeriesSeasonsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesSeasonsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesSeasonsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesStatsSeriesDocs + +> IracingServiceMethodDocs getSeriesStatsSeriesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesStatsSeriesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getSeriesStatsSeriesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsDocs + +> { [key: string]: IracingServiceMethodDocs; } getStatsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberBestsDocs + +> IracingServiceMethodDocs getStatsMemberBestsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberBestsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberBestsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberCareerDocs + +> IracingServiceMethodDocs getStatsMemberCareerDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberCareerDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberCareerDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberDivisionDocs + +> IracingServiceMethodDocs getStatsMemberDivisionDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberDivisionDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberDivisionDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberRecapDocs + +> IracingServiceMethodDocs getStatsMemberRecapDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberRecapDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberRecapDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberRecentRacesDocs + +> IracingServiceMethodDocs getStatsMemberRecentRacesDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberRecentRacesDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberRecentRacesDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberSummaryDocs + +> IracingServiceMethodDocs getStatsMemberSummaryDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberSummaryDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberSummaryDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberYearlyDocs + +> IracingServiceMethodDocs getStatsMemberYearlyDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberYearlyDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsMemberYearlyDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonDriverStandingsDocs + +> IracingServiceMethodDocs getStatsSeasonDriverStandingsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonDriverStandingsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsSeasonDriverStandingsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonQualifyResultsDocs + +> IracingServiceMethodDocs getStatsSeasonQualifyResultsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonQualifyResultsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsSeasonQualifyResultsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonSupersessionStandingsDocs + +> IracingServiceMethodDocs getStatsSeasonSupersessionStandingsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonSupersessionStandingsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsSeasonSupersessionStandingsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonTTResultsDocs + +> IracingServiceMethodDocs getStatsSeasonTTResultsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonTTResultsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsSeasonTTResultsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonTTStandingsDocs + +> IracingServiceMethodDocs getStatsSeasonTTStandingsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonTTStandingsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsSeasonTTStandingsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonTeamStandingsDocs + +> IracingServiceMethodDocs getStatsSeasonTeamStandingsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonTeamStandingsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsSeasonTeamStandingsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsWorldRecordsDocs + +> IracingServiceMethodDocs getStatsWorldRecordsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsWorldRecordsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getStatsWorldRecordsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTeamDocs + +> { [key: string]: IracingServiceMethodDocs; } getTeamDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTeamDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTeamDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTeamGetDocs + +> IracingServiceMethodDocs getTeamGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTeamGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTeamGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTeamMembershipDocs + +> IracingServiceMethodDocs getTeamMembershipDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTeamMembershipDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTeamMembershipDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTimeAttackDocs + +> { [key: string]: IracingServiceMethodDocs; } getTimeAttackDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTimeAttackDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTimeAttackDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTimeAttackMemberSeasonResultsDocs + +> IracingServiceMethodDocs getTimeAttackMemberSeasonResultsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTimeAttackMemberSeasonResultsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTimeAttackMemberSeasonResultsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTrackAssetsDocs + +> IracingServiceMethodDocs getTrackAssetsDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTrackAssetsDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTrackAssetsDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTrackDocs + +> { [key: string]: IracingServiceMethodDocs; } getTrackDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTrackDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTrackDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**{ [key: string]: IracingServiceMethodDocs; }**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTrackGetDocs + +> IracingServiceMethodDocs getTrackGetDocs() + + + +### Example + +```ts +import { + Configuration, + DocApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTrackGetDocsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DocApi(config); + + try { + const data = await api.getTrackGetDocs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingServiceMethodDocs**](IracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/DriverStatsApi.md b/packages/api/client/fetch/docs/DriverStatsApi.md new file mode 100644 index 0000000..35d7305 --- /dev/null +++ b/packages/api/client/fetch/docs/DriverStatsApi.md @@ -0,0 +1,81 @@ +# DriverStatsApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getDriverStatsByCategory**](DriverStatsApi.md#getdriverstatsbycategory) | **GET** /data/driver_stats_by_category/{category} | | + + + +## getDriverStatsByCategory + +> IracingAPIResponse getDriverStatsByCategory(category) + + + +### Example + +```ts +import { + Configuration, + DriverStatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetDriverStatsByCategoryRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DriverStatsApi(config); + + const body = { + // IracingCategory | Racing category. + category: ..., + } satisfies GetDriverStatsByCategoryRequest; + + try { + const data = await api.getDriverStatsByCategory(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **category** | `IracingCategory` | Racing category. | [Defaults to `undefined`] [Enum: oval, road, dirt_road, dirt_oval, sports_car, formula_car] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/ErrorResponse.md b/packages/api/client/fetch/docs/ErrorResponse.md new file mode 100644 index 0000000..9536871 --- /dev/null +++ b/packages/api/client/fetch/docs/ErrorResponse.md @@ -0,0 +1,38 @@ + +# ErrorResponse + + +## Properties + +Name | Type +------------ | ------------- +`error` | string +`message` | string +`note` | string + +## Example + +```typescript +import type { ErrorResponse } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { + "error": null, + "message": null, + "note": null, +} satisfies ErrorResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ErrorResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/HostedApi.md b/packages/api/client/fetch/docs/HostedApi.md new file mode 100644 index 0000000..9179647 --- /dev/null +++ b/packages/api/client/fetch/docs/HostedApi.md @@ -0,0 +1,150 @@ +# HostedApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getHostedCombinedSessions**](HostedApi.md#gethostedcombinedsessions) | **GET** /data/hosted/combined_sessions | | +| [**getHostedSessions**](HostedApi.md#gethostedsessions) | **GET** /data/hosted/sessions | | + + + +## getHostedCombinedSessions + +> IracingAPIResponse getHostedCombinedSessions(package_id) + + + +Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + +### Example + +```ts +import { + Configuration, + HostedApi, +} from '@iracing-data/api-client-fetch'; +import type { GetHostedCombinedSessionsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new HostedApi(config); + + const body = { + // number | If set, return only sessions using this car or track package ID. (optional) + package_id: 8.14, + } satisfies GetHostedCombinedSessionsRequest; + + try { + const data = await api.getHostedCombinedSessions(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **package_id** | `number` | If set, return only sessions using this car or track package ID. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getHostedSessions + +> IracingAPIResponse getHostedSessions() + + + +Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + +### Example + +```ts +import { + Configuration, + HostedApi, +} from '@iracing-data/api-client-fetch'; +import type { GetHostedSessionsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new HostedApi(config); + + try { + const data = await api.getHostedSessions(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/IracingAPIResponse.md b/packages/api/client/fetch/docs/IracingAPIResponse.md new file mode 100644 index 0000000..e8c51e9 --- /dev/null +++ b/packages/api/client/fetch/docs/IracingAPIResponse.md @@ -0,0 +1,37 @@ + +# IracingAPIResponse + +Response from iRacing `/data` API. + +## Properties + +Name | Type +------------ | ------------- +`link` | string +`expires` | Date + +## Example + +```typescript +import type { IracingAPIResponse } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { + "link": null, + "expires": null, +} satisfies IracingAPIResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingAPIResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/IracingCategory.md b/packages/api/client/fetch/docs/IracingCategory.md new file mode 100644 index 0000000..8e9fcc0 --- /dev/null +++ b/packages/api/client/fetch/docs/IracingCategory.md @@ -0,0 +1,33 @@ + +# IracingCategory + +Racing category. + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { IracingCategory } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { +} satisfies IracingCategory + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingCategory +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/IracingDivision.md b/packages/api/client/fetch/docs/IracingDivision.md new file mode 100644 index 0000000..516d298 --- /dev/null +++ b/packages/api/client/fetch/docs/IracingDivision.md @@ -0,0 +1,33 @@ + +# IracingDivision + +iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { IracingDivision } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { +} satisfies IracingDivision + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingDivision +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/IracingEventType.md b/packages/api/client/fetch/docs/IracingEventType.md new file mode 100644 index 0000000..7396a3f --- /dev/null +++ b/packages/api/client/fetch/docs/IracingEventType.md @@ -0,0 +1,33 @@ + +# IracingEventType + +iRacing Event Type + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { IracingEventType } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { +} satisfies IracingEventType + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingEventType +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/IracingServiceMethodDocs.md b/packages/api/client/fetch/docs/IracingServiceMethodDocs.md new file mode 100644 index 0000000..ec02638 --- /dev/null +++ b/packages/api/client/fetch/docs/IracingServiceMethodDocs.md @@ -0,0 +1,39 @@ + +# IracingServiceMethodDocs + +An iRacing API Service Method object. + +## Properties + +Name | Type +------------ | ------------- +`link` | string +`parameters` | [{ [key: string]: IracingServiceMethodParametersDocs; }](IracingServiceMethodParametersDocs.md) +`expirationSeconds` | number + +## Example + +```typescript +import type { IracingServiceMethodDocs } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { + "link": null, + "parameters": null, + "expirationSeconds": null, +} satisfies IracingServiceMethodDocs + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingServiceMethodDocs +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/IracingServiceMethodParametersDocs.md b/packages/api/client/fetch/docs/IracingServiceMethodParametersDocs.md new file mode 100644 index 0000000..63bc903 --- /dev/null +++ b/packages/api/client/fetch/docs/IracingServiceMethodParametersDocs.md @@ -0,0 +1,39 @@ + +# IracingServiceMethodParametersDocs + +An iRacing API Service Method Parameters object. + +## Properties + +Name | Type +------------ | ------------- +`type` | string +`note` | string +`required` | boolean + +## Example + +```typescript +import type { IracingServiceMethodParametersDocs } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { + "type": null, + "note": null, + "required": null, +} satisfies IracingServiceMethodParametersDocs + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingServiceMethodParametersDocs +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/LeagueApi.md b/packages/api/client/fetch/docs/LeagueApi.md new file mode 100644 index 0000000..be1a4ea --- /dev/null +++ b/packages/api/client/fetch/docs/LeagueApi.md @@ -0,0 +1,731 @@ +# LeagueApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getLeague**](LeagueApi.md#getleague) | **GET** /data/league/get | | +| [**getLeagueCustomerLeagueSessions**](LeagueApi.md#getleaguecustomerleaguesessions) | **GET** /data/league/cust_league_sessions | | +| [**getLeagueDirectory**](LeagueApi.md#getleaguedirectory) | **GET** /data/league/directory | | +| [**getLeagueMembership**](LeagueApi.md#getleaguemembership) | **GET** /data/league/membership | | +| [**getLeaguePointsSystems**](LeagueApi.md#getleaguepointssystems) | **GET** /data/league/get_points_systems | | +| [**getLeagueRoster**](LeagueApi.md#getleagueroster) | **GET** /data/league/roster | | +| [**getLeagueSeasonSessions**](LeagueApi.md#getleagueseasonsessions) | **GET** /data/league/season_sessions | | +| [**getLeagueSeasonStandings**](LeagueApi.md#getleagueseasonstandings) | **GET** /data/league/season_standings | | +| [**getLeagueSeasons**](LeagueApi.md#getleagueseasons) | **GET** /data/league/seasons | | + + + +## getLeague + +> IracingAPIResponse getLeague(league_id, include_licenses) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number + league_id: 8.14, + // boolean | For faster responses, only request when necessary. (optional) + include_licenses: true, + } satisfies GetLeagueRequest; + + try { + const data = await api.getLeague(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **league_id** | `number` | | [Defaults to `undefined`] | +| **include_licenses** | `boolean` | For faster responses, only request when necessary. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueCustomerLeagueSessions + +> IracingAPIResponse getLeagueCustomerLeagueSessions(mine, package_id) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueCustomerLeagueSessionsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // boolean | If true, return only sessions created by this user. (optional) + mine: true, + // number | If set, return only sessions using this car or track package ID. (optional) + package_id: 8.14, + } satisfies GetLeagueCustomerLeagueSessionsRequest; + + try { + const data = await api.getLeagueCustomerLeagueSessions(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **mine** | `boolean` | If true, return only sessions created by this user. | [Optional] [Defaults to `undefined`] | +| **package_id** | `number` | If set, return only sessions using this car or track package ID. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueDirectory + +> IracingAPIResponse getLeagueDirectory(search, tag, restrict_to_member, restrict_to_recruiting, restrict_to_friends, restrict_to_watched, minimum_roster_count, maximum_roster_count, lowerbound, upperbound, sort, order) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueDirectoryRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // string | Will search against league name, description, owner, and league ID. (optional) + search: search_example, + // string | One or more tags, comma-separated. (optional) + tag: tag_example, + // boolean | If true include only leagues for which customer is a member. (optional) + restrict_to_member: true, + // boolean | If true include only leagues which are recruiting. (optional) + restrict_to_recruiting: true, + // boolean | If true include only leagues owned by a friend. (optional) + restrict_to_friends: true, + // boolean | If true include only leagues owned by a watched member. (optional) + restrict_to_watched: true, + // number | If set include leagues with at least this number of members. (optional) + minimum_roster_count: 8.14, + // number | If set include leagues with no more than this number of members. (optional) + maximum_roster_count: 8.14, + // number | First row of results to return. Defaults to 1. (optional) + lowerbound: 8.14, + // number | Last row of results to return. Defaults to lowerbound + 39. (optional) + upperbound: 8.14, + // string | One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. (optional) + sort: sort_example, + // string | One of asc or desc. Defaults to asc. (optional) + order: order_example, + } satisfies GetLeagueDirectoryRequest; + + try { + const data = await api.getLeagueDirectory(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search** | `string` | Will search against league name, description, owner, and league ID. | [Optional] [Defaults to `undefined`] | +| **tag** | `string` | One or more tags, comma-separated. | [Optional] [Defaults to `undefined`] | +| **restrict_to_member** | `boolean` | If true include only leagues for which customer is a member. | [Optional] [Defaults to `undefined`] | +| **restrict_to_recruiting** | `boolean` | If true include only leagues which are recruiting. | [Optional] [Defaults to `undefined`] | +| **restrict_to_friends** | `boolean` | If true include only leagues owned by a friend. | [Optional] [Defaults to `undefined`] | +| **restrict_to_watched** | `boolean` | If true include only leagues owned by a watched member. | [Optional] [Defaults to `undefined`] | +| **minimum_roster_count** | `number` | If set include leagues with at least this number of members. | [Optional] [Defaults to `undefined`] | +| **maximum_roster_count** | `number` | If set include leagues with no more than this number of members. | [Optional] [Defaults to `undefined`] | +| **lowerbound** | `number` | First row of results to return. Defaults to 1. | [Optional] [Defaults to `undefined`] | +| **upperbound** | `number` | Last row of results to return. Defaults to lowerbound + 39. | [Optional] [Defaults to `undefined`] | +| **sort** | `string` | One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. | [Optional] [Defaults to `undefined`] | +| **order** | `string` | One of asc or desc. Defaults to asc. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueMembership + +> IracingAPIResponse getLeagueMembership(cust_id, include_league) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueMembershipRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number | If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. (optional) + cust_id: 8.14, + // boolean (optional) + include_league: true, + } satisfies GetLeagueMembershipRequest; + + try { + const data = await api.getLeagueMembership(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. | [Optional] [Defaults to `undefined`] | +| **include_league** | `boolean` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeaguePointsSystems + +> IracingAPIResponse getLeaguePointsSystems(league_id, season_id) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeaguePointsSystemsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number + league_id: 8.14, + // number | If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. (optional) + season_id: 8.14, + } satisfies GetLeaguePointsSystemsRequest; + + try { + const data = await api.getLeaguePointsSystems(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **league_id** | `number` | | [Defaults to `undefined`] | +| **season_id** | `number` | If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueRoster + +> IracingAPIResponse getLeagueRoster(league_id, include_licenses) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueRosterRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number + league_id: 8.14, + // boolean | For faster responses, only request when necessary. (optional) + include_licenses: true, + } satisfies GetLeagueRosterRequest; + + try { + const data = await api.getLeagueRoster(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **league_id** | `number` | | [Defaults to `undefined`] | +| **include_licenses** | `boolean` | For faster responses, only request when necessary. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueSeasonSessions + +> IracingAPIResponse getLeagueSeasonSessions(league_id, season_id, results_only) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueSeasonSessionsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number + league_id: 8.14, + // number + season_id: 8.14, + // boolean | If true include only sessions for which results are available. (optional) + results_only: true, + } satisfies GetLeagueSeasonSessionsRequest; + + try { + const data = await api.getLeagueSeasonSessions(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **league_id** | `number` | | [Defaults to `undefined`] | +| **season_id** | `number` | | [Defaults to `undefined`] | +| **results_only** | `boolean` | If true include only sessions for which results are available. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueSeasonStandings + +> IracingAPIResponse getLeagueSeasonStandings(league_id, season_id, car_class_id, car_id) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueSeasonStandingsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number + league_id: 8.14, + // number + season_id: 8.14, + // number (optional) + car_class_id: 8.14, + // number | If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. (optional) + car_id: 8.14, + } satisfies GetLeagueSeasonStandingsRequest; + + try { + const data = await api.getLeagueSeasonStandings(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **league_id** | `number` | | [Defaults to `undefined`] | +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Optional] [Defaults to `undefined`] | +| **car_id** | `number` | If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLeagueSeasons + +> IracingAPIResponse getLeagueSeasons(league_id, retired) + + + +### Example + +```ts +import { + Configuration, + LeagueApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLeagueSeasonsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LeagueApi(config); + + const body = { + // number + league_id: 8.14, + // boolean | If true include seasons which are no longer active. (optional) + retired: true, + } satisfies GetLeagueSeasonsRequest; + + try { + const data = await api.getLeagueSeasons(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **league_id** | `number` | | [Defaults to `undefined`] | +| **retired** | `boolean` | If true include seasons which are no longer active. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/LookupApi.md b/packages/api/client/fetch/docs/LookupApi.md new file mode 100644 index 0000000..19fb130 --- /dev/null +++ b/packages/api/client/fetch/docs/LookupApi.md @@ -0,0 +1,344 @@ +# LookupApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getLookup**](LookupApi.md#getlookup) | **GET** /data/lookup/get | | +| [**getLookupCountries**](LookupApi.md#getlookupcountries) | **GET** /data/lookup/countries | | +| [**getLookupDrivers**](LookupApi.md#getlookupdrivers) | **GET** /data/lookup/drivers | | +| [**getLookupFlairs**](LookupApi.md#getlookupflairs) | **GET** /data/lookup/flairs | | +| [**getLookupLicenses**](LookupApi.md#getlookuplicenses) | **GET** /data/lookup/licenses | | + + + +## getLookup + +> IracingAPIResponse getLookup() + + + +### Example + +```ts +import { + Configuration, + LookupApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LookupApi(config); + + try { + const data = await api.getLookup(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupCountries + +> IracingAPIResponse getLookupCountries() + + + +### Example + +```ts +import { + Configuration, + LookupApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupCountriesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LookupApi(config); + + try { + const data = await api.getLookupCountries(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupDrivers + +> IracingAPIResponse getLookupDrivers(search_term, league_id) + + + +### Example + +```ts +import { + Configuration, + LookupApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupDriversRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LookupApi(config); + + const body = { + // string | A cust_id or partial name for which to search. + search_term: search_term_example, + // number | Narrow the search to the roster of the given league. (optional) + league_id: 8.14, + } satisfies GetLookupDriversRequest; + + try { + const data = await api.getLookupDrivers(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **search_term** | `string` | A cust_id or partial name for which to search. | [Defaults to `undefined`] | +| **league_id** | `number` | Narrow the search to the roster of the given league. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupFlairs + +> IracingAPIResponse getLookupFlairs() + + + +### Example + +```ts +import { + Configuration, + LookupApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupFlairsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LookupApi(config); + + try { + const data = await api.getLookupFlairs(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getLookupLicenses + +> IracingAPIResponse getLookupLicenses() + + + +### Example + +```ts +import { + Configuration, + LookupApi, +} from '@iracing-data/api-client-fetch'; +import type { GetLookupLicensesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new LookupApi(config); + + try { + const data = await api.getLookupLicenses(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/MemberApi.md b/packages/api/client/fetch/docs/MemberApi.md new file mode 100644 index 0000000..839ce0d --- /dev/null +++ b/packages/api/client/fetch/docs/MemberApi.md @@ -0,0 +1,515 @@ +# MemberApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getMember**](MemberApi.md#getmember) | **GET** /data/member/get | | +| [**getMemberAwardInstances**](MemberApi.md#getmemberawardinstances) | **GET** /data/member/award_instances | | +| [**getMemberAwards**](MemberApi.md#getmemberawards) | **GET** /data/member/awards | | +| [**getMemberChartData**](MemberApi.md#getmemberchartdata) | **GET** /data/member/chart_data | | +| [**getMemberInfo**](MemberApi.md#getmemberinfo) | **GET** /data/member/info | | +| [**getMemberParticipationCredits**](MemberApi.md#getmemberparticipationcredits) | **GET** /data/member/participation_credits | | +| [**getMemberProfile**](MemberApi.md#getmemberprofile) | **GET** /data/member/profile | Gets a requested user\'s profile. | + + + +## getMember + +> IracingAPIResponse getMember(cust_ids, include_licenses) + + + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + const body = { + // string | Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + cust_ids: cust_ids_example, + // boolean (optional) + include_licenses: true, + } satisfies GetMemberRequest; + + try { + const data = await api.getMember(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_ids** | `string` | Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 | [Defaults to `undefined`] | +| **include_licenses** | `boolean` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberAwardInstances + +> IracingAPIResponse getMemberAwardInstances(award_id, cust_id) + + + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberAwardInstancesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + const body = { + // number + award_id: 8.14, + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetMemberAwardInstancesRequest; + + try { + const data = await api.getMemberAwardInstances(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **award_id** | `number` | | [Defaults to `undefined`] | +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberAwards + +> IracingAPIResponse getMemberAwards(cust_id) + + + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberAwardsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetMemberAwardsRequest; + + try { + const data = await api.getMemberAwards(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberChartData + +> IracingAPIResponse getMemberChartData(category_id, chart_type, cust_id) + + + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberChartDataRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + const body = { + // number | 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + category_id: 8.14, + // number | 1 - iRating; 2 - TT Rating; 3 - License/SR + chart_type: 8.14, + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetMemberChartDataRequest; + + try { + const data = await api.getMemberChartData(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **category_id** | `number` | 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road | [Defaults to `undefined`] | +| **chart_type** | `number` | 1 - iRating; 2 - TT Rating; 3 - License/SR | [Defaults to `undefined`] | +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberInfo + +> IracingAPIResponse getMemberInfo() + + + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberInfoRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + try { + const data = await api.getMemberInfo(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberParticipationCredits + +> IracingAPIResponse getMemberParticipationCredits() + + + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberParticipationCreditsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + try { + const data = await api.getMemberParticipationCredits(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getMemberProfile + +> IracingAPIResponse getMemberProfile(cust_id) + +Gets a requested user\'s profile. + +### Example + +```ts +import { + Configuration, + MemberApi, +} from '@iracing-data/api-client-fetch'; +import type { GetMemberProfileRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new MemberApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetMemberProfileRequest; + + try { + const data = await api.getMemberProfile(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/PostAuthRequest.md b/packages/api/client/fetch/docs/PostAuthRequest.md new file mode 100644 index 0000000..c92ce00 --- /dev/null +++ b/packages/api/client/fetch/docs/PostAuthRequest.md @@ -0,0 +1,36 @@ + +# PostAuthRequest + + +## Properties + +Name | Type +------------ | ------------- +`email` | string +`password` | string + +## Example + +```typescript +import type { PostAuthRequest } from '@iracing-data/api-client-fetch' + +// TODO: Update the object below with actual values +const example = { + "email": null, + "password": null, +} satisfies PostAuthRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as PostAuthRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/api/client/fetch/docs/ResultsApi.md b/packages/api/client/fetch/docs/ResultsApi.md new file mode 100644 index 0000000..32c5ad3 --- /dev/null +++ b/packages/api/client/fetch/docs/ResultsApi.md @@ -0,0 +1,615 @@ +# ResultsApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getResults**](ResultsApi.md#getresults) | **GET** /data/results/get | | +| [**getResultsEventLog**](ResultsApi.md#getresultseventlog) | **GET** /data/results/event_log | | +| [**getResultsLapChartData**](ResultsApi.md#getresultslapchartdata) | **GET** /data/results/lap_chart_data | | +| [**getResultsLapData**](ResultsApi.md#getresultslapdata) | **GET** /data/results/lap_data | | +| [**getResultsSearchHosted**](ResultsApi.md#getresultssearchhosted) | **GET** /data/results/search_hosted | | +| [**getResultsSearchSeries**](ResultsApi.md#getresultssearchseries) | **GET** /data/results/search_series | | +| [**getResultsSeasonResults**](ResultsApi.md#getresultsseasonresults) | **GET** /data/results/season_results | | + + + +## getResults + +> IracingAPIResponse getResults(subsession_id, include_licenses) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // number + subsession_id: 8.14, + // boolean (optional) + include_licenses: true, + } satisfies GetResultsRequest; + + try { + const data = await api.getResults(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | `number` | | [Defaults to `undefined`] | +| **include_licenses** | `boolean` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsEventLog + +> IracingAPIResponse getResultsEventLog(subsession_id, simsession_number) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsEventLogRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // number + subsession_id: 8.14, + // number | The main event is 0; the preceding event is -1, and so on. + simsession_number: 8.14, + } satisfies GetResultsEventLogRequest; + + try { + const data = await api.getResultsEventLog(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | `number` | | [Defaults to `undefined`] | +| **simsession_number** | `number` | The main event is 0; the preceding event is -1, and so on. | [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsLapChartData + +> IracingAPIResponse getResultsLapChartData(subsession_id, simsession_number) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsLapChartDataRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // number + subsession_id: 8.14, + // number | The main event is 0; the preceding event is -1, and so on. + simsession_number: 8.14, + } satisfies GetResultsLapChartDataRequest; + + try { + const data = await api.getResultsLapChartData(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | `number` | | [Defaults to `undefined`] | +| **simsession_number** | `number` | The main event is 0; the preceding event is -1, and so on. | [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsLapData + +> IracingAPIResponse getResultsLapData(subsession_id, simsession_number, cust_id, team_id) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsLapDataRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // number + subsession_id: 8.14, + // number | The main event is 0; the preceding event is -1, and so on. + simsession_number: 8.14, + // number | Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. (optional) + cust_id: 8.14, + // number | Required if the subsession was a team event. (optional) + team_id: 8.14, + } satisfies GetResultsLapDataRequest; + + try { + const data = await api.getResultsLapData(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **subsession_id** | `number` | | [Defaults to `undefined`] | +| **simsession_number** | `number` | The main event is 0; the preceding event is -1, and so on. | [Defaults to `undefined`] | +| **cust_id** | `number` | Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. | [Optional] [Defaults to `undefined`] | +| **team_id** | `number` | Required if the subsession was a team event. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsSearchHosted + +> IracingAPIResponse getResultsSearchHosted(start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, host_cust_id, session_name, league_id, league_season_id, car_id, track_id, category_ids) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsSearchHostedRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // Date | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) + start_range_begin: 2013-10-20T19:20:30+01:00, + // Date | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. (optional) + start_range_end: 2013-10-20T19:20:30+01:00, + // Date | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) + finish_range_begin: 2013-10-20T19:20:30+01:00, + // Date | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. (optional) + finish_range_end: 2013-10-20T19:20:30+01:00, + // number | The participant\'s customer ID. Ignored if team_id is supplied. (optional) + cust_id: 8.14, + // number | The team ID to search for. Takes priority over cust_id if both are supplied. (optional) + team_id: 8.14, + // number | The host\'s customer ID. (optional) + host_cust_id: 8.14, + // string | Part or all of the session\'s name. (optional) + session_name: session_name_example, + // number | Include only results for the league with this ID. (optional) + league_id: 8.14, + // number | Include only results for the league season with this ID. (optional) + league_season_id: 8.14, + // number | One of the cars used by the session. (optional) + car_id: 8.14, + // number | The ID of the track used by the session. (optional) + track_id: 8.14, + // string | Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 (optional) + category_ids: category_ids_example, + } satisfies GetResultsSearchHostedRequest; + + try { + const data = await api.getResultsSearchHosted(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **start_range_begin** | `Date` | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | [Optional] [Defaults to `undefined`] | +| **start_range_end** | `Date` | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. | [Optional] [Defaults to `undefined`] | +| **finish_range_begin** | `Date` | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | [Optional] [Defaults to `undefined`] | +| **finish_range_end** | `Date` | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. | [Optional] [Defaults to `undefined`] | +| **cust_id** | `number` | The participant\'s customer ID. Ignored if team_id is supplied. | [Optional] [Defaults to `undefined`] | +| **team_id** | `number` | The team ID to search for. Takes priority over cust_id if both are supplied. | [Optional] [Defaults to `undefined`] | +| **host_cust_id** | `number` | The host\'s customer ID. | [Optional] [Defaults to `undefined`] | +| **session_name** | `string` | Part or all of the session\'s name. | [Optional] [Defaults to `undefined`] | +| **league_id** | `number` | Include only results for the league with this ID. | [Optional] [Defaults to `undefined`] | +| **league_season_id** | `number` | Include only results for the league season with this ID. | [Optional] [Defaults to `undefined`] | +| **car_id** | `number` | One of the cars used by the session. | [Optional] [Defaults to `undefined`] | +| **track_id** | `number` | The ID of the track used by the session. | [Optional] [Defaults to `undefined`] | +| **category_ids** | `string` | Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsSearchSeries + +> IracingAPIResponse getResultsSearchSeries(season_year, season_quarter, start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, series_id, race_week_num, official_only, event_types, category_ids) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsSearchSeriesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // number | Required when using season_quarter. (optional) + season_year: 8.14, + // number | Required when using season_year. (optional) + season_quarter: 8.14, + // Date | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) + start_range_begin: 2013-10-20T19:20:30+01:00, + // Date | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. (optional) + start_range_end: 2013-10-20T19:20:30+01:00, + // Date | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". (optional) + finish_range_begin: 2013-10-20T19:20:30+01:00, + // Date | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. (optional) + finish_range_end: 2013-10-20T19:20:30+01:00, + // number | Include only sessions in which this customer participated. Ignored if team_id is supplied. (optional) + cust_id: 8.14, + // number | Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. (optional) + team_id: 8.14, + // number | Include only sessions for series with this ID. (optional) + series_id: 8.14, + // number | Include only sessions with this race week number. (optional) + race_week_num: 8.14, + // boolean | If true, include only sessions earning championship points. Defaults to all. (optional) + official_only: true, + // string | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 (optional) + event_types: event_types_example, + // string | License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 (optional) + category_ids: category_ids_example, + } satisfies GetResultsSearchSeriesRequest; + + try { + const data = await api.getResultsSearchSeries(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_year** | `number` | Required when using season_quarter. | [Optional] [Defaults to `undefined`] | +| **season_quarter** | `number` | Required when using season_year. | [Optional] [Defaults to `undefined`] | +| **start_range_begin** | `Date` | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | [Optional] [Defaults to `undefined`] | +| **start_range_end** | `Date` | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. | [Optional] [Defaults to `undefined`] | +| **finish_range_begin** | `Date` | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | [Optional] [Defaults to `undefined`] | +| **finish_range_end** | `Date` | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. | [Optional] [Defaults to `undefined`] | +| **cust_id** | `number` | Include only sessions in which this customer participated. Ignored if team_id is supplied. | [Optional] [Defaults to `undefined`] | +| **team_id** | `number` | Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. | [Optional] [Defaults to `undefined`] | +| **series_id** | `number` | Include only sessions for series with this ID. | [Optional] [Defaults to `undefined`] | +| **race_week_num** | `number` | Include only sessions with this race week number. | [Optional] [Defaults to `undefined`] | +| **official_only** | `boolean` | If true, include only sessions earning championship points. Defaults to all. | [Optional] [Defaults to `undefined`] | +| **event_types** | `string` | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | [Optional] [Defaults to `undefined`] | +| **category_ids** | `string` | License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getResultsSeasonResults + +> IracingAPIResponse getResultsSeasonResults(season_id, event_type, race_week_num) + + + +### Example + +```ts +import { + Configuration, + ResultsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetResultsSeasonResultsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ResultsApi(config); + + const body = { + // number + season_id: 8.14, + // IracingEventType | Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race (optional) + event_type: ..., + // number | The first race week of a season is 0. (optional) + race_week_num: 8.14, + } satisfies GetResultsSeasonResultsRequest; + + try { + const data = await api.getResultsSeasonResults(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **event_type** | `IracingEventType` | Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race | [Optional] [Defaults to `undefined`] [Enum: 2, 3, 4, 5] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/SeasonApi.md b/packages/api/client/fetch/docs/SeasonApi.md new file mode 100644 index 0000000..ad15b6c --- /dev/null +++ b/packages/api/client/fetch/docs/SeasonApi.md @@ -0,0 +1,309 @@ +# SeasonApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getSeasonList**](SeasonApi.md#getseasonlist) | **GET** /data/season/list | | +| [**getSeasonRaceGuide**](SeasonApi.md#getseasonraceguide) | **GET** /data/season/race_guide | | +| [**getSeasonSpectatorSubsessionIds**](SeasonApi.md#getseasonspectatorsubsessionids) | **GET** /data/season/spectator_subsessionids | | +| [**getSeasonSpectatorSubsessionIdsDetail**](SeasonApi.md#getseasonspectatorsubsessionidsdetail) | **GET** /data/season/spectator_subsessionids_detail | | + + + +## getSeasonList + +> IracingAPIResponse getSeasonList(season_year, season_quarter) + + + +### Example + +```ts +import { + Configuration, + SeasonApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonListRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeasonApi(config); + + const body = { + // number + season_year: 8.14, + // number + season_quarter: 8.14, + } satisfies GetSeasonListRequest; + + try { + const data = await api.getSeasonList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_year** | `number` | | [Defaults to `undefined`] | +| **season_quarter** | `number` | | [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonRaceGuide + +> IracingAPIResponse getSeasonRaceGuide(from, include_end_after_from) + + + +### Example + +```ts +import { + Configuration, + SeasonApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonRaceGuideRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeasonApi(config); + + const body = { + // Date | ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. (optional) + from: 2013-10-20T19:20:30+01:00, + // boolean | Include sessions which start before \'from\' but end after. (optional) + include_end_after_from: true, + } satisfies GetSeasonRaceGuideRequest; + + try { + const data = await api.getSeasonRaceGuide(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **from** | `Date` | ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. | [Optional] [Defaults to `undefined`] | +| **include_end_after_from** | `boolean` | Include sessions which start before \'from\' but end after. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonSpectatorSubsessionIds + +> IracingAPIResponse getSeasonSpectatorSubsessionIds(event_types) + + + +### Example + +```ts +import { + Configuration, + SeasonApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonSpectatorSubsessionIdsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeasonApi(config); + + const body = { + // Array | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 (optional) + event_types: ..., + } satisfies GetSeasonSpectatorSubsessionIdsRequest; + + try { + const data = await api.getSeasonSpectatorSubsessionIds(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **event_types** | `Array` | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | [Optional] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeasonSpectatorSubsessionIdsDetail + +> IracingAPIResponse getSeasonSpectatorSubsessionIdsDetail(event_types, season_ids) + + + +### Example + +```ts +import { + Configuration, + SeasonApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeasonSpectatorSubsessionIdsDetailRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeasonApi(config); + + const body = { + // Array | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 (optional) + event_types: ..., + // Array | Seasons to include in the search. Defaults to all. ?season_ids=513,937 (optional) + season_ids: ..., + } satisfies GetSeasonSpectatorSubsessionIdsDetailRequest; + + try { + const data = await api.getSeasonSpectatorSubsessionIdsDetail(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **event_types** | `Array` | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | [Optional] | +| **season_ids** | `Array` | Seasons to include in the search. Defaults to all. ?season_ids=513,937 | [Optional] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/SeriesApi.md b/packages/api/client/fetch/docs/SeriesApi.md new file mode 100644 index 0000000..29e5ffe --- /dev/null +++ b/packages/api/client/fetch/docs/SeriesApi.md @@ -0,0 +1,507 @@ +# SeriesApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getSeries**](SeriesApi.md#getseries) | **GET** /data/series/get | | +| [**getSeriesAssets**](SeriesApi.md#getseriesassets) | **GET** /data/series/assets | | +| [**getSeriesPastSeasons**](SeriesApi.md#getseriespastseasons) | **GET** /data/series/past_seasons | | +| [**getSeriesSeasonList**](SeriesApi.md#getseriesseasonlist) | **GET** /data/series/season_list | | +| [**getSeriesSeasonSchedule**](SeriesApi.md#getseriesseasonschedule) | **GET** /data/series/season_schedule | | +| [**getSeriesSeasons**](SeriesApi.md#getseriesseasons) | **GET** /data/series/seasons | | +| [**getSeriesStatsSeries**](SeriesApi.md#getseriesstatsseries) | **GET** /data/series/stats_series | | + + + +## getSeries + +> IracingAPIResponse getSeries() + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + try { + const data = await api.getSeries(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesAssets + +> IracingAPIResponse getSeriesAssets() + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesAssetsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + try { + const data = await api.getSeriesAssets(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesPastSeasons + +> IracingAPIResponse getSeriesPastSeasons(series_id) + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesPastSeasonsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + const body = { + // number + series_id: 8.14, + } satisfies GetSeriesPastSeasonsRequest; + + try { + const data = await api.getSeriesPastSeasons(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **series_id** | `number` | | [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesSeasonList + +> IracingAPIResponse getSeriesSeasonList(include_series, season_year, season_quarter) + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesSeasonListRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + const body = { + // boolean (optional) + include_series: true, + // number (optional) + season_year: 8.14, + // number (optional) + season_quarter: 8.14, + } satisfies GetSeriesSeasonListRequest; + + try { + const data = await api.getSeriesSeasonList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **include_series** | `boolean` | | [Optional] [Defaults to `undefined`] | +| **season_year** | `number` | | [Optional] [Defaults to `undefined`] | +| **season_quarter** | `number` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesSeasonSchedule + +> IracingAPIResponse getSeriesSeasonSchedule(season_id) + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesSeasonScheduleRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + const body = { + // number + season_id: 8.14, + } satisfies GetSeriesSeasonScheduleRequest; + + try { + const data = await api.getSeriesSeasonSchedule(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesSeasons + +> IracingAPIResponse getSeriesSeasons(include_series, season_year, season_quarter) + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesSeasonsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + const body = { + // boolean (optional) + include_series: true, + // number | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. (optional) + season_year: 8.14, + // number | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. (optional) + season_quarter: 8.14, + } satisfies GetSeriesSeasonsRequest; + + try { + const data = await api.getSeriesSeasons(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **include_series** | `boolean` | | [Optional] [Defaults to `undefined`] | +| **season_year** | `number` | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. | [Optional] [Defaults to `undefined`] | +| **season_quarter** | `number` | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getSeriesStatsSeries + +> IracingAPIResponse getSeriesStatsSeries() + + + +### Example + +```ts +import { + Configuration, + SeriesApi, +} from '@iracing-data/api-client-fetch'; +import type { GetSeriesStatsSeriesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SeriesApi(config); + + try { + const data = await api.getSeriesStatsSeries(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/StatsApi.md b/packages/api/client/fetch/docs/StatsApi.md new file mode 100644 index 0000000..4201c78 --- /dev/null +++ b/packages/api/client/fetch/docs/StatsApi.md @@ -0,0 +1,1102 @@ +# StatsApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getStatsMemberBests**](StatsApi.md#getstatsmemberbests) | **GET** /data/stats/member_bests | | +| [**getStatsMemberCareer**](StatsApi.md#getstatsmembercareer) | **GET** /data/stats/member_career | | +| [**getStatsMemberDivision**](StatsApi.md#getstatsmemberdivision) | **GET** /data/stats/member_division | | +| [**getStatsMemberRecap**](StatsApi.md#getstatsmemberrecap) | **GET** /data/stats/member_recap | | +| [**getStatsMemberRecentRaces**](StatsApi.md#getstatsmemberrecentraces) | **GET** /data/stats/member_recent_races | | +| [**getStatsMemberSummary**](StatsApi.md#getstatsmembersummary) | **GET** /data/stats/member_summary | | +| [**getStatsMemberYearly**](StatsApi.md#getstatsmemberyearly) | **GET** /data/stats/member_yearly | | +| [**getStatsSeasonDriverStandings**](StatsApi.md#getstatsseasondriverstandings) | **GET** /data/stats/season_driver_standings | | +| [**getStatsSeasonQualifyResults**](StatsApi.md#getstatsseasonqualifyresults) | **GET** /data/stats/season_qualify_results | | +| [**getStatsSeasonSupersessionStandings**](StatsApi.md#getstatsseasonsupersessionstandings) | **GET** /data/stats/season_supersession_standings | | +| [**getStatsSeasonTeamStandings**](StatsApi.md#getstatsseasonteamstandings) | **GET** /data/stats/season_team_standings | | +| [**getStatsSeasonTimeTrialResults**](StatsApi.md#getstatsseasontimetrialresults) | **GET** /data/stats/season_time_trial_results | | +| [**getStatsSeasonTimeTrialStandings**](StatsApi.md#getstatsseasontimetrialstandings) | **GET** /data/stats/season_time_trial_standings | | +| [**getStatsWorldRecords**](StatsApi.md#getstatsworldrecords) | **GET** /data/stats/world_records | | + + + +## getStatsMemberBests + +> IracingAPIResponse getStatsMemberBests(cust_id, car_id) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberBestsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + // number | First call should exclude car_id; use cars_driven list in return for subsequent calls. (optional) + car_id: 8.14, + } satisfies GetStatsMemberBestsRequest; + + try { + const data = await api.getStatsMemberBests(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | +| **car_id** | `number` | First call should exclude car_id; use cars_driven list in return for subsequent calls. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberCareer + +> IracingAPIResponse getStatsMemberCareer(cust_id) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberCareerRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetStatsMemberCareerRequest; + + try { + const data = await api.getStatsMemberCareer(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberDivision + +> IracingAPIResponse getStatsMemberDivision(season_id, event_type) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberDivisionRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // 4 | 5 | The event type code for the division type: 4 - Time Trial; 5 - Race + event_type: 8.14, + } satisfies GetStatsMemberDivisionRequest; + + try { + const data = await api.getStatsMemberDivision(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **event_type** | `4`, `5` | The event type code for the division type: 4 - Time Trial; 5 - Race | [Defaults to `undefined`] [Enum: 4, 5] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberRecap + +> IracingAPIResponse getStatsMemberRecap(cust_id, year, season) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberRecapRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + // 1 | 2 | 3 | 4 | Season year; if not supplied the current calendar year (UTC) is used. (optional) + year: 8.14, + // number | Season (quarter) within the year; if not supplied the recap will be for the entire year. (optional) + season: 8.14, + } satisfies GetStatsMemberRecapRequest; + + try { + const data = await api.getStatsMemberRecap(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | +| **year** | `1`, `2`, `3`, `4` | Season year; if not supplied the current calendar year (UTC) is used. | [Optional] [Defaults to `undefined`] [Enum: 1, 2, 3, 4] | +| **season** | `number` | Season (quarter) within the year; if not supplied the recap will be for the entire year. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberRecentRaces + +> IracingAPIResponse getStatsMemberRecentRaces(cust_id) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberRecentRacesRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetStatsMemberRecentRacesRequest; + + try { + const data = await api.getStatsMemberRecentRaces(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberSummary + +> IracingAPIResponse getStatsMemberSummary(cust_id) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberSummaryRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetStatsMemberSummaryRequest; + + try { + const data = await api.getStatsMemberSummary(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsMemberYearly + +> IracingAPIResponse getStatsMemberYearly(cust_id) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsMemberYearlyRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number | Defaults to the authenticated member. (optional) + cust_id: 8.14, + } satisfies GetStatsMemberYearlyRequest; + + try { + const data = await api.getStatsMemberYearly(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cust_id** | `number` | Defaults to the authenticated member. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonDriverStandings + +> IracingAPIResponse getStatsSeasonDriverStandings(season_id, car_class_id, division, race_week_num) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonDriverStandingsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // number + car_class_id: 8.14, + // IracingDivision (optional) + division: ..., + // number | The first race week of a season is 0. (optional) + race_week_num: 8.14, + } satisfies GetStatsSeasonDriverStandingsRequest; + + try { + const data = await api.getStatsSeasonDriverStandings(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Defaults to `undefined`] | +| **division** | `IracingDivision` | | [Optional] [Defaults to `undefined`] [Enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonQualifyResults + +> IracingAPIResponse getStatsSeasonQualifyResults(season_id, car_class_id, race_week_num, division) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonQualifyResultsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // number + car_class_id: 8.14, + // number | The first race week of a season is 0. + race_week_num: 8.14, + // IracingDivision (optional) + division: ..., + } satisfies GetStatsSeasonQualifyResultsRequest; + + try { + const data = await api.getStatsSeasonQualifyResults(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Defaults to `undefined`] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Defaults to `undefined`] | +| **division** | `IracingDivision` | | [Optional] [Defaults to `undefined`] [Enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonSupersessionStandings + +> IracingAPIResponse getStatsSeasonSupersessionStandings(season_id, car_class_id, division, race_week_num) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonSupersessionStandingsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // number + car_class_id: 8.14, + // IracingDivision (optional) + division: ..., + // number | The first race week of a season is 0. (optional) + race_week_num: 8.14, + } satisfies GetStatsSeasonSupersessionStandingsRequest; + + try { + const data = await api.getStatsSeasonSupersessionStandings(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Defaults to `undefined`] | +| **division** | `IracingDivision` | | [Optional] [Defaults to `undefined`] [Enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonTeamStandings + +> IracingAPIResponse getStatsSeasonTeamStandings(season_id, car_class_id, race_week_num) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonTeamStandingsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // number + car_class_id: 8.14, + // number | The first race week of a season is 0. (optional) + race_week_num: 8.14, + } satisfies GetStatsSeasonTeamStandingsRequest; + + try { + const data = await api.getStatsSeasonTeamStandings(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Defaults to `undefined`] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonTimeTrialResults + +> IracingAPIResponse getStatsSeasonTimeTrialResults(season_id, car_class_id, race_week_num, division) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonTimeTrialResultsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // number + car_class_id: 8.14, + // number | The first race week of a season is 0. + race_week_num: 8.14, + // IracingDivision (optional) + division: ..., + } satisfies GetStatsSeasonTimeTrialResultsRequest; + + try { + const data = await api.getStatsSeasonTimeTrialResults(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Defaults to `undefined`] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Defaults to `undefined`] | +| **division** | `IracingDivision` | | [Optional] [Defaults to `undefined`] [Enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsSeasonTimeTrialStandings + +> IracingAPIResponse getStatsSeasonTimeTrialStandings(season_id, car_class_id, division, race_week_num) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsSeasonTimeTrialStandingsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + season_id: 8.14, + // number + car_class_id: 8.14, + // IracingDivision (optional) + division: ..., + // number | The first race week of a season is 0. (optional) + race_week_num: 8.14, + } satisfies GetStatsSeasonTimeTrialStandingsRequest; + + try { + const data = await api.getStatsSeasonTimeTrialStandings(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **season_id** | `number` | | [Defaults to `undefined`] | +| **car_class_id** | `number` | | [Defaults to `undefined`] | +| **division** | `IracingDivision` | | [Optional] [Defaults to `undefined`] [Enum: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | +| **race_week_num** | `number` | The first race week of a season is 0. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getStatsWorldRecords + +> IracingAPIResponse getStatsWorldRecords(car_id, track_id, season_year, season_quarter) + + + +### Example + +```ts +import { + Configuration, + StatsApi, +} from '@iracing-data/api-client-fetch'; +import type { GetStatsWorldRecordsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new StatsApi(config); + + const body = { + // number + car_id: 8.14, + // number + track_id: 8.14, + // number | Limit best times to a given year. (optional) + season_year: 8.14, + // number | Limit best times to a given quarter; only applicable when year is used. (optional) + season_quarter: 8.14, + } satisfies GetStatsWorldRecordsRequest; + + try { + const data = await api.getStatsWorldRecords(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **car_id** | `number` | | [Defaults to `undefined`] | +| **track_id** | `number` | | [Defaults to `undefined`] | +| **season_year** | `number` | Limit best times to a given year. | [Optional] [Defaults to `undefined`] | +| **season_quarter** | `number` | Limit best times to a given quarter; only applicable when year is used. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/TeamApi.md b/packages/api/client/fetch/docs/TeamApi.md new file mode 100644 index 0000000..7a6637b --- /dev/null +++ b/packages/api/client/fetch/docs/TeamApi.md @@ -0,0 +1,149 @@ +# TeamApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getTeam**](TeamApi.md#getteam) | **GET** /data/team/get | | +| [**getTeamMembership**](TeamApi.md#getteammembership) | **GET** /data/team/membership | | + + + +## getTeam + +> IracingAPIResponse getTeam(team_id, include_licenses) + + + +### Example + +```ts +import { + Configuration, + TeamApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTeamRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new TeamApi(config); + + const body = { + // number + team_id: 8.14, + // boolean | For faster responses, only request when necessary. (optional) + include_licenses: true, + } satisfies GetTeamRequest; + + try { + const data = await api.getTeam(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **team_id** | `number` | | [Defaults to `undefined`] | +| **include_licenses** | `boolean` | For faster responses, only request when necessary. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTeamMembership + +> IracingAPIResponse getTeamMembership() + + + +### Example + +```ts +import { + Configuration, + TeamApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTeamMembershipRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new TeamApi(config); + + try { + const data = await api.getTeamMembership(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/TimeAttackApi.md b/packages/api/client/fetch/docs/TimeAttackApi.md new file mode 100644 index 0000000..ff53b5e --- /dev/null +++ b/packages/api/client/fetch/docs/TimeAttackApi.md @@ -0,0 +1,81 @@ +# TimeAttackApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getTimeAttackMemberSeasonResults**](TimeAttackApi.md#gettimeattackmemberseasonresults) | **GET** /data/time_attack/member_season_results | | + + + +## getTimeAttackMemberSeasonResults + +> IracingAPIResponse getTimeAttackMemberSeasonResults(ta_comp_season_id) + + + +### Example + +```ts +import { + Configuration, + TimeAttackApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTimeAttackMemberSeasonResultsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new TimeAttackApi(config); + + const body = { + // number + ta_comp_season_id: 8.14, + } satisfies GetTimeAttackMemberSeasonResultsRequest; + + try { + const data = await api.getTimeAttackMemberSeasonResults(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **ta_comp_season_id** | `number` | | [Defaults to `undefined`] | + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/docs/TrackApi.md b/packages/api/client/fetch/docs/TrackApi.md new file mode 100644 index 0000000..2031793 --- /dev/null +++ b/packages/api/client/fetch/docs/TrackApi.md @@ -0,0 +1,138 @@ +# TrackApi + +All URIs are relative to *https://members-ng.iracing.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getTrack**](TrackApi.md#gettrack) | **GET** /data/track/get | | +| [**getTrackAssets**](TrackApi.md#gettrackassets) | **GET** /data/track/assets | | + + + +## getTrack + +> IracingAPIResponse getTrack() + + + +### Example + +```ts +import { + Configuration, + TrackApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTrackRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new TrackApi(config); + + try { + const data = await api.getTrack(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getTrackAssets + +> IracingAPIResponse getTrackAssets() + + + +### Example + +```ts +import { + Configuration, + TrackApi, +} from '@iracing-data/api-client-fetch'; +import type { GetTrackAssetsRequest } from '@iracing-data/api-client-fetch'; + +async function example() { + console.log("🚀 Testing @iracing-data/api-client-fetch SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new TrackApi(config); + + try { + const data = await api.getTrackAssets(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingAPIResponse**](IracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **401** | Access token is missing or invalid. | - | +| **429** | Rate limited | * x-ratelimit-limit -
* x-ratelimit-remaining -
* x-ratelimit-reset -
| +| **503** | Maintenance | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/api/client/fetch/package.json b/packages/api/client/fetch/package.json new file mode 100644 index 0000000..00f7ae2 --- /dev/null +++ b/packages/api/client/fetch/package.json @@ -0,0 +1,19 @@ +{ + "name": "@iracing-data/api-client-fetch", + "version": "0.0.1", + "description": "OpenAPI client for @iracing-data/api-client-fetch", + "author": "OpenAPI-Generator", + "repository": { + "type": "git", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepare": "npm run build" + }, + "devDependencies": { + "typescript": "^4.0 || ^5.0" + } +} diff --git a/packages/api/client/fetch/src/apis/AuthApi.ts b/packages/api/client/fetch/src/apis/AuthApi.ts new file mode 100644 index 0000000..38e76c3 --- /dev/null +++ b/packages/api/client/fetch/src/apis/AuthApi.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PostAuthRequest, +} from '../models/index'; +import { + PostAuthRequestFromJSON, + PostAuthRequestToJSON, +} from '../models/index'; + +export interface PostAuthOperationRequest { + post_auth_request?: PostAuthRequest; +} + +/** + * + */ +export class AuthApi extends runtime.BaseAPI { + + /** + */ + async postAuthRaw(requestParameters: PostAuthOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/auth`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PostAuthRequestToJSON(requestParameters['post_auth_request']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async postAuth(requestParameters: PostAuthOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.postAuthRaw(requestParameters, initOverrides); + } + +} diff --git a/packages/api/client/fetch/src/apis/CarApi.ts b/packages/api/client/fetch/src/apis/CarApi.ts new file mode 100644 index 0000000..fb9b42d --- /dev/null +++ b/packages/api/client/fetch/src/apis/CarApi.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +/** + * + */ +export class CarApi extends runtime.BaseAPI { + + /** + */ + async getCarRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/car/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getCar(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCarRaw(initOverrides); + return await response.value(); + } + + /** + * image paths are relative to https://images-static.iracing.com/ + */ + async getCarAssetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/car/assets`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * image paths are relative to https://images-static.iracing.com/ + */ + async getCarAssets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCarAssetsRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/CarclassApi.ts b/packages/api/client/fetch/src/apis/CarclassApi.ts new file mode 100644 index 0000000..fe207fd --- /dev/null +++ b/packages/api/client/fetch/src/apis/CarclassApi.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +/** + * + */ +export class CarclassApi extends runtime.BaseAPI { + + /** + * Gets car classes. + */ + async getCarClassRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/carclass/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Gets car classes. + */ + async getCarClass(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCarClassRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/ConstantsApi.ts b/packages/api/client/fetch/src/apis/ConstantsApi.ts new file mode 100644 index 0000000..2545032 --- /dev/null +++ b/packages/api/client/fetch/src/apis/ConstantsApi.ts @@ -0,0 +1,144 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +/** + * + */ +export class ConstantsApi extends runtime.BaseAPI { + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsCategoriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/constants/categories`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsCategories(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConstantsCategoriesRaw(initOverrides); + return await response.value(); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsDivisionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/constants/divisions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsDivisions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConstantsDivisionsRaw(initOverrides); + return await response.value(); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsEventTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/constants/event_types`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsEventTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConstantsEventTypesRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/DocApi.ts b/packages/api/client/fetch/src/apis/DocApi.ts new file mode 100644 index 0000000..79d3191 --- /dev/null +++ b/packages/api/client/fetch/src/apis/DocApi.ts @@ -0,0 +1,2953 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingCategory, + IracingServiceMethodDocs, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingCategoryFromJSON, + IracingCategoryToJSON, + IracingServiceMethodDocsFromJSON, + IracingServiceMethodDocsToJSON, +} from '../models/index'; + +export interface GetDriverStatsByCategoryCategoryDocsRequest { + category: IracingCategory; +} + +/** + * + */ +export class DocApi extends runtime.BaseAPI { + + /** + */ + async getCarAssetsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/car/assets`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getCarAssetsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCarAssetsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarClassDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/carclass`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getCarClassDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getCarClassDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarClassGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/carclass/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getCarClassGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCarClassGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/car`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getCarDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getCarDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/car/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getCarGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getCarGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsCategoriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants/categories`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getConstantsCategoriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConstantsCategoriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsDivisionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants/divisions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getConstantsDivisionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConstantsDivisionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getConstantsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getConstantsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsEventTypesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants/event_types`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getConstantsEventTypesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getConstantsEventTypesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + */ + async getDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }> { + const response = await this.getDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getDriverStatsByCategoryCategoryDocsRaw(requestParameters: GetDriverStatsByCategoryCategoryDocsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['category'] == null) { + throw new runtime.RequiredError( + 'category', + 'Required parameter "category" was null or undefined when calling getDriverStatsByCategoryCategoryDocs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/driver_stats_by_category/{category}`; + urlPath = urlPath.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters['category']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getDriverStatsByCategoryCategoryDocs(requestParameters: GetDriverStatsByCategoryCategoryDocsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDriverStatsByCategoryCategoryDocsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getDriverStatsByCategoryDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/driver_stats_by_category`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getDriverStatsByCategoryDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getDriverStatsByCategoryDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getHostedCombinedSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/hosted/combined_sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getHostedCombinedSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHostedCombinedSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getHostedDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/hosted`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getHostedDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getHostedDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getHostedSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/hosted/sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getHostedSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHostedSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueCustomerLeagueSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/cust_league_sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueCustomerLeagueSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueCustomerLeagueSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueDirectoryDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/directory`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueDirectoryDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueDirectoryDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getLeagueDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getLeagueDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueGetPointsSystemsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/get_points_systems`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueGetPointsSystemsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueGetPointsSystemsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueMembershipDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/membership`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueMembershipDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueMembershipDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueRosterDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/roster`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueRosterDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueRosterDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/season_sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueSeasonSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueSeasonSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/season_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueSeasonStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueSeasonStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/seasons`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLeagueSeasonsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueSeasonsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupCountriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/countries`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLookupCountriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupCountriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getLookupDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getLookupDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupDriversDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/drivers`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLookupDriversDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupDriversDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupFlairsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/flairs`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLookupFlairsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupFlairsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLookupGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupLicensesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/licenses`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getLookupLicensesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupLicensesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardInstancesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/award_instances`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberAwardInstancesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberAwardInstancesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/awards`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberAwardsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberAwardsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberChartDataDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/chart_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberChartDataDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberChartDataDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getMemberDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getMemberDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberInfoDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/info`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberInfoDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberInfoDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberParticipationCreditsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/participation_credits`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberParticipationCreditsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberParticipationCreditsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberProfileDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/profile`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getMemberProfileDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberProfileDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsEventLogDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/event_log`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsEventLogDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsEventLogDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsLapChartDataDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/lap_chart_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsLapChartDataDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsLapChartDataDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsLapDataDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/lap_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsLapDataDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsLapDataDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSearchHostedDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/search_hosted`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsSearchHostedDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsSearchHostedDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSearchSeriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/search_series`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsSearchSeriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsSearchSeriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSeasonResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/season_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getResultsSeasonResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsSeasonResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getSeasonDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getSeasonDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonListDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/list`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeasonListDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonListDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonRaceGuideDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/race_guide`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeasonRaceGuideDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonRaceGuideDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetailDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/spectator_subsessionids_detail`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetailDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonSpectatorSubsessionIdsDetailDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/spectator_subsessionids`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonSpectatorSubsessionIdsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesAssetsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/assets`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesAssetsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesAssetsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getSeriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getSeriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesPastSeasonsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/past_seasons`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesPastSeasonsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesPastSeasonsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonListDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/season_list`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesSeasonListDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesSeasonListDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonScheduleDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/season_schedule`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesSeasonScheduleDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesSeasonScheduleDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/seasons`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesSeasonsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesSeasonsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesStatsSeriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/stats_series`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getSeriesStatsSeriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesStatsSeriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getStatsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getStatsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberBestsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_bests`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberBestsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberBestsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberCareerDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_career`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberCareerDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberCareerDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberDivisionDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_division`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberDivisionDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberDivisionDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberRecapDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_recap`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberRecapDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberRecapDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberRecentRacesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_recent_races`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberRecentRacesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberRecentRacesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberSummaryDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_summary`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberSummaryDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberSummaryDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberYearlyDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_yearly`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberYearlyDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberYearlyDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonDriverStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_driver_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonDriverStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonDriverStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonQualifyResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_qualify_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonQualifyResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonQualifyResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonSupersessionStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_supersession_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonSupersessionStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonSupersessionStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTTResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_tt_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonTTResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonTTResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTTStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_tt_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonTTStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonTTStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTeamStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_team_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonTeamStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonTeamStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsWorldRecordsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/world_records`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getStatsWorldRecordsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsWorldRecordsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTeamDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/team`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getTeamDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getTeamDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTeamGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/team/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getTeamGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTeamGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTeamMembershipDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/team/membership`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getTeamMembershipDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTeamMembershipDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTimeAttackDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/time_attack`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getTimeAttackDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getTimeAttackDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTimeAttackMemberSeasonResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/time_attack/member_season_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getTimeAttackMemberSeasonResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTimeAttackMemberSeasonResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackAssetsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/track/assets`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getTrackAssetsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackAssetsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/track`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); + } + + /** + */ + async getTrackDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { + const response = await this.getTrackDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/track/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); + } + + /** + */ + async getTrackGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackGetDocsRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/DriverStatsApi.ts b/packages/api/client/fetch/src/apis/DriverStatsApi.ts new file mode 100644 index 0000000..78c9145 --- /dev/null +++ b/packages/api/client/fetch/src/apis/DriverStatsApi.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, + IracingCategory, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingCategoryFromJSON, + IracingCategoryToJSON, +} from '../models/index'; + +export interface GetDriverStatsByCategoryRequest { + category: IracingCategory; +} + +/** + * + */ +export class DriverStatsApi extends runtime.BaseAPI { + + /** + */ + async getDriverStatsByCategoryRaw(requestParameters: GetDriverStatsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['category'] == null) { + throw new runtime.RequiredError( + 'category', + 'Required parameter "category" was null or undefined when calling getDriverStatsByCategory().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/driver_stats_by_category/{category}`; + urlPath = urlPath.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters['category']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getDriverStatsByCategory(requestParameters: GetDriverStatsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDriverStatsByCategoryRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/HostedApi.ts b/packages/api/client/fetch/src/apis/HostedApi.ts new file mode 100644 index 0000000..208cab2 --- /dev/null +++ b/packages/api/client/fetch/src/apis/HostedApi.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetHostedCombinedSessionsRequest { + package_id?: number; +} + +/** + * + */ +export class HostedApi extends runtime.BaseAPI { + + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + */ + async getHostedCombinedSessionsRaw(requestParameters: GetHostedCombinedSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['package_id'] != null) { + queryParameters['package_id'] = requestParameters['package_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/hosted/combined_sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + */ + async getHostedCombinedSessions(requestParameters: GetHostedCombinedSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHostedCombinedSessionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + */ + async getHostedSessionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/hosted/sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + */ + async getHostedSessions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getHostedSessionsRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/LeagueApi.ts b/packages/api/client/fetch/src/apis/LeagueApi.ts new file mode 100644 index 0000000..3d970a6 --- /dev/null +++ b/packages/api/client/fetch/src/apis/LeagueApi.ts @@ -0,0 +1,586 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetLeagueRequest { + league_id: number; + include_licenses?: boolean; +} + +export interface GetLeagueCustomerLeagueSessionsRequest { + mine?: boolean; + package_id?: number; +} + +export interface GetLeagueDirectoryRequest { + search?: string; + tag?: string; + restrict_to_member?: boolean; + restrict_to_recruiting?: boolean; + restrict_to_friends?: boolean; + restrict_to_watched?: boolean; + minimum_roster_count?: number; + maximum_roster_count?: number; + lowerbound?: number; + upperbound?: number; + sort?: string; + order?: string; +} + +export interface GetLeagueMembershipRequest { + cust_id?: number; + include_league?: boolean; +} + +export interface GetLeaguePointsSystemsRequest { + league_id: number; + season_id?: number; +} + +export interface GetLeagueRosterRequest { + league_id: number; + include_licenses?: boolean; +} + +export interface GetLeagueSeasonSessionsRequest { + league_id: number; + season_id: number; + results_only?: boolean; +} + +export interface GetLeagueSeasonStandingsRequest { + league_id: number; + season_id: number; + car_class_id?: number; + car_id?: number; +} + +export interface GetLeagueSeasonsRequest { + league_id: number; + retired?: boolean; +} + +/** + * + */ +export class LeagueApi extends runtime.BaseAPI { + + /** + */ + async getLeagueRaw(requestParameters: GetLeagueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['league_id'] == null) { + throw new runtime.RequiredError( + 'league_id', + 'Required parameter "league_id" was null or undefined when calling getLeague().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['include_licenses'] != null) { + queryParameters['include_licenses'] = requestParameters['include_licenses']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeague(requestParameters: GetLeagueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueCustomerLeagueSessionsRaw(requestParameters: GetLeagueCustomerLeagueSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['mine'] != null) { + queryParameters['mine'] = requestParameters['mine']; + } + + if (requestParameters['package_id'] != null) { + queryParameters['package_id'] = requestParameters['package_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/cust_league_sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueCustomerLeagueSessions(requestParameters: GetLeagueCustomerLeagueSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueCustomerLeagueSessionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueDirectoryRaw(requestParameters: GetLeagueDirectoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['search'] != null) { + queryParameters['search'] = requestParameters['search']; + } + + if (requestParameters['tag'] != null) { + queryParameters['tag'] = requestParameters['tag']; + } + + if (requestParameters['restrict_to_member'] != null) { + queryParameters['restrict_to_member'] = requestParameters['restrict_to_member']; + } + + if (requestParameters['restrict_to_recruiting'] != null) { + queryParameters['restrict_to_recruiting'] = requestParameters['restrict_to_recruiting']; + } + + if (requestParameters['restrict_to_friends'] != null) { + queryParameters['restrict_to_friends'] = requestParameters['restrict_to_friends']; + } + + if (requestParameters['restrict_to_watched'] != null) { + queryParameters['restrict_to_watched'] = requestParameters['restrict_to_watched']; + } + + if (requestParameters['minimum_roster_count'] != null) { + queryParameters['minimum_roster_count'] = requestParameters['minimum_roster_count']; + } + + if (requestParameters['maximum_roster_count'] != null) { + queryParameters['maximum_roster_count'] = requestParameters['maximum_roster_count']; + } + + if (requestParameters['lowerbound'] != null) { + queryParameters['lowerbound'] = requestParameters['lowerbound']; + } + + if (requestParameters['upperbound'] != null) { + queryParameters['upperbound'] = requestParameters['upperbound']; + } + + if (requestParameters['sort'] != null) { + queryParameters['sort'] = requestParameters['sort']; + } + + if (requestParameters['order'] != null) { + queryParameters['order'] = requestParameters['order']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/directory`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueDirectory(requestParameters: GetLeagueDirectoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueDirectoryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueMembershipRaw(requestParameters: GetLeagueMembershipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['include_league'] != null) { + queryParameters['include_league'] = requestParameters['include_league']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/membership`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueMembership(requestParameters: GetLeagueMembershipRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueMembershipRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeaguePointsSystemsRaw(requestParameters: GetLeaguePointsSystemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['league_id'] == null) { + throw new runtime.RequiredError( + 'league_id', + 'Required parameter "league_id" was null or undefined when calling getLeaguePointsSystems().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/get_points_systems`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeaguePointsSystems(requestParameters: GetLeaguePointsSystemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeaguePointsSystemsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueRosterRaw(requestParameters: GetLeagueRosterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['league_id'] == null) { + throw new runtime.RequiredError( + 'league_id', + 'Required parameter "league_id" was null or undefined when calling getLeagueRoster().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['include_licenses'] != null) { + queryParameters['include_licenses'] = requestParameters['include_licenses']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/roster`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueRoster(requestParameters: GetLeagueRosterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueRosterRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonSessionsRaw(requestParameters: GetLeagueSeasonSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['league_id'] == null) { + throw new runtime.RequiredError( + 'league_id', + 'Required parameter "league_id" was null or undefined when calling getLeagueSeasonSessions().' + ); + } + + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getLeagueSeasonSessions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['results_only'] != null) { + queryParameters['results_only'] = requestParameters['results_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/season_sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueSeasonSessions(requestParameters: GetLeagueSeasonSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueSeasonSessionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonStandingsRaw(requestParameters: GetLeagueSeasonStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['league_id'] == null) { + throw new runtime.RequiredError( + 'league_id', + 'Required parameter "league_id" was null or undefined when calling getLeagueSeasonStandings().' + ); + } + + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getLeagueSeasonStandings().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['car_id'] != null) { + queryParameters['car_id'] = requestParameters['car_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/season_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueSeasonStandings(requestParameters: GetLeagueSeasonStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueSeasonStandingsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonsRaw(requestParameters: GetLeagueSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['league_id'] == null) { + throw new runtime.RequiredError( + 'league_id', + 'Required parameter "league_id" was null or undefined when calling getLeagueSeasons().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['retired'] != null) { + queryParameters['retired'] = requestParameters['retired']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/league/seasons`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLeagueSeasons(requestParameters: GetLeagueSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLeagueSeasonsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/LookupApi.ts b/packages/api/client/fetch/src/apis/LookupApi.ts new file mode 100644 index 0000000..274e660 --- /dev/null +++ b/packages/api/client/fetch/src/apis/LookupApi.ts @@ -0,0 +1,228 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetLookupDriversRequest { + search_term: string; + league_id?: number; +} + +/** + * + */ +export class LookupApi extends runtime.BaseAPI { + + /** + */ + async getLookupRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/lookup/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLookup(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupCountriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/lookup/countries`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLookupCountries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupCountriesRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupDriversRaw(requestParameters: GetLookupDriversRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['search_term'] == null) { + throw new runtime.RequiredError( + 'search_term', + 'Required parameter "search_term" was null or undefined when calling getLookupDrivers().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['search_term'] != null) { + queryParameters['search_term'] = requestParameters['search_term']; + } + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/lookup/drivers`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLookupDrivers(requestParameters: GetLookupDriversRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupDriversRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLookupFlairsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/lookup/flairs`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLookupFlairs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupFlairsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupLicensesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/lookup/licenses`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getLookupLicenses(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLookupLicensesRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/MemberApi.ts b/packages/api/client/fetch/src/apis/MemberApi.ts new file mode 100644 index 0000000..c95f805 --- /dev/null +++ b/packages/api/client/fetch/src/apis/MemberApi.ts @@ -0,0 +1,368 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetMemberRequest { + cust_ids: string; + include_licenses?: boolean; +} + +export interface GetMemberAwardInstancesRequest { + award_id: number; + cust_id?: number; +} + +export interface GetMemberAwardsRequest { + cust_id?: number; +} + +export interface GetMemberChartDataRequest { + category_id: number; + chart_type: number; + cust_id?: number; +} + +export interface GetMemberProfileRequest { + cust_id?: number; +} + +/** + * + */ +export class MemberApi extends runtime.BaseAPI { + + /** + */ + async getMemberRaw(requestParameters: GetMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cust_ids'] == null) { + throw new runtime.RequiredError( + 'cust_ids', + 'Required parameter "cust_ids" was null or undefined when calling getMember().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cust_ids'] != null) { + queryParameters['cust_ids'] = requestParameters['cust_ids']; + } + + if (requestParameters['include_licenses'] != null) { + queryParameters['include_licenses'] = requestParameters['include_licenses']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getMember(requestParameters: GetMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardInstancesRaw(requestParameters: GetMemberAwardInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['award_id'] == null) { + throw new runtime.RequiredError( + 'award_id', + 'Required parameter "award_id" was null or undefined when calling getMemberAwardInstances().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['award_id'] != null) { + queryParameters['award_id'] = requestParameters['award_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/award_instances`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getMemberAwardInstances(requestParameters: GetMemberAwardInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberAwardInstancesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardsRaw(requestParameters: GetMemberAwardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/awards`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getMemberAwards(requestParameters: GetMemberAwardsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberAwardsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getMemberChartDataRaw(requestParameters: GetMemberChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['category_id'] == null) { + throw new runtime.RequiredError( + 'category_id', + 'Required parameter "category_id" was null or undefined when calling getMemberChartData().' + ); + } + + if (requestParameters['chart_type'] == null) { + throw new runtime.RequiredError( + 'chart_type', + 'Required parameter "chart_type" was null or undefined when calling getMemberChartData().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['category_id'] != null) { + queryParameters['category_id'] = requestParameters['category_id']; + } + + if (requestParameters['chart_type'] != null) { + queryParameters['chart_type'] = requestParameters['chart_type']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/chart_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getMemberChartData(requestParameters: GetMemberChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberChartDataRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getMemberInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/info`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getMemberInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberInfoRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberParticipationCreditsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/participation_credits`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getMemberParticipationCredits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberParticipationCreditsRaw(initOverrides); + return await response.value(); + } + + /** + * Gets a requested user\'s profile. + */ + async getMemberProfileRaw(requestParameters: GetMemberProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/member/profile`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + * Gets a requested user\'s profile. + */ + async getMemberProfile(requestParameters: GetMemberProfileRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getMemberProfileRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/ResultsApi.ts b/packages/api/client/fetch/src/apis/ResultsApi.ts new file mode 100644 index 0000000..546e446 --- /dev/null +++ b/packages/api/client/fetch/src/apis/ResultsApi.ts @@ -0,0 +1,553 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, + IracingEventType, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingEventTypeFromJSON, + IracingEventTypeToJSON, +} from '../models/index'; + +export interface GetResultsRequest { + subsession_id: number; + include_licenses?: boolean; +} + +export interface GetResultsEventLogRequest { + subsession_id: number; + simsession_number: number; +} + +export interface GetResultsLapChartDataRequest { + subsession_id: number; + simsession_number: number; +} + +export interface GetResultsLapDataRequest { + subsession_id: number; + simsession_number: number; + cust_id?: number; + team_id?: number; +} + +export interface GetResultsSearchHostedRequest { + start_range_begin?: Date; + start_range_end?: Date; + finish_range_begin?: Date; + finish_range_end?: Date; + cust_id?: number; + team_id?: number; + host_cust_id?: number; + session_name?: string; + league_id?: number; + league_season_id?: number; + car_id?: number; + track_id?: number; + category_ids?: string; +} + +export interface GetResultsSearchSeriesRequest { + season_year?: number; + season_quarter?: number; + start_range_begin?: Date; + start_range_end?: Date; + finish_range_begin?: Date; + finish_range_end?: Date; + cust_id?: number; + team_id?: number; + series_id?: number; + race_week_num?: number; + official_only?: boolean; + event_types?: string; + category_ids?: string; +} + +export interface GetResultsSeasonResultsRequest { + season_id: number; + event_type?: IracingEventType; + race_week_num?: number; +} + +/** + * + */ +export class ResultsApi extends runtime.BaseAPI { + + /** + */ + async getResultsRaw(requestParameters: GetResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subsession_id'] == null) { + throw new runtime.RequiredError( + 'subsession_id', + 'Required parameter "subsession_id" was null or undefined when calling getResults().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subsession_id'] != null) { + queryParameters['subsession_id'] = requestParameters['subsession_id']; + } + + if (requestParameters['include_licenses'] != null) { + queryParameters['include_licenses'] = requestParameters['include_licenses']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResults(requestParameters: GetResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsEventLogRaw(requestParameters: GetResultsEventLogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subsession_id'] == null) { + throw new runtime.RequiredError( + 'subsession_id', + 'Required parameter "subsession_id" was null or undefined when calling getResultsEventLog().' + ); + } + + if (requestParameters['simsession_number'] == null) { + throw new runtime.RequiredError( + 'simsession_number', + 'Required parameter "simsession_number" was null or undefined when calling getResultsEventLog().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subsession_id'] != null) { + queryParameters['subsession_id'] = requestParameters['subsession_id']; + } + + if (requestParameters['simsession_number'] != null) { + queryParameters['simsession_number'] = requestParameters['simsession_number']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/event_log`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResultsEventLog(requestParameters: GetResultsEventLogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsEventLogRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsLapChartDataRaw(requestParameters: GetResultsLapChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subsession_id'] == null) { + throw new runtime.RequiredError( + 'subsession_id', + 'Required parameter "subsession_id" was null or undefined when calling getResultsLapChartData().' + ); + } + + if (requestParameters['simsession_number'] == null) { + throw new runtime.RequiredError( + 'simsession_number', + 'Required parameter "simsession_number" was null or undefined when calling getResultsLapChartData().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subsession_id'] != null) { + queryParameters['subsession_id'] = requestParameters['subsession_id']; + } + + if (requestParameters['simsession_number'] != null) { + queryParameters['simsession_number'] = requestParameters['simsession_number']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/lap_chart_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResultsLapChartData(requestParameters: GetResultsLapChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsLapChartDataRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsLapDataRaw(requestParameters: GetResultsLapDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subsession_id'] == null) { + throw new runtime.RequiredError( + 'subsession_id', + 'Required parameter "subsession_id" was null or undefined when calling getResultsLapData().' + ); + } + + if (requestParameters['simsession_number'] == null) { + throw new runtime.RequiredError( + 'simsession_number', + 'Required parameter "simsession_number" was null or undefined when calling getResultsLapData().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subsession_id'] != null) { + queryParameters['subsession_id'] = requestParameters['subsession_id']; + } + + if (requestParameters['simsession_number'] != null) { + queryParameters['simsession_number'] = requestParameters['simsession_number']; + } + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['team_id'] != null) { + queryParameters['team_id'] = requestParameters['team_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/lap_data`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResultsLapData(requestParameters: GetResultsLapDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsLapDataRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSearchHostedRaw(requestParameters: GetResultsSearchHostedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['start_range_begin'] != null) { + queryParameters['start_range_begin'] = requestParameters['start_range_begin']; + } + + if (requestParameters['start_range_end'] != null) { + queryParameters['start_range_end'] = requestParameters['start_range_end']; + } + + if (requestParameters['finish_range_begin'] != null) { + queryParameters['finish_range_begin'] = requestParameters['finish_range_begin']; + } + + if (requestParameters['finish_range_end'] != null) { + queryParameters['finish_range_end'] = requestParameters['finish_range_end']; + } + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['team_id'] != null) { + queryParameters['team_id'] = requestParameters['team_id']; + } + + if (requestParameters['host_cust_id'] != null) { + queryParameters['host_cust_id'] = requestParameters['host_cust_id']; + } + + if (requestParameters['session_name'] != null) { + queryParameters['session_name'] = requestParameters['session_name']; + } + + if (requestParameters['league_id'] != null) { + queryParameters['league_id'] = requestParameters['league_id']; + } + + if (requestParameters['league_season_id'] != null) { + queryParameters['league_season_id'] = requestParameters['league_season_id']; + } + + if (requestParameters['car_id'] != null) { + queryParameters['car_id'] = requestParameters['car_id']; + } + + if (requestParameters['track_id'] != null) { + queryParameters['track_id'] = requestParameters['track_id']; + } + + if (requestParameters['category_ids'] != null) { + queryParameters['category_ids'] = requestParameters['category_ids']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/search_hosted`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResultsSearchHosted(requestParameters: GetResultsSearchHostedRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsSearchHostedRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSearchSeriesRaw(requestParameters: GetResultsSearchSeriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['season_year'] != null) { + queryParameters['season_year'] = requestParameters['season_year']; + } + + if (requestParameters['season_quarter'] != null) { + queryParameters['season_quarter'] = requestParameters['season_quarter']; + } + + if (requestParameters['start_range_begin'] != null) { + queryParameters['start_range_begin'] = requestParameters['start_range_begin']; + } + + if (requestParameters['start_range_end'] != null) { + queryParameters['start_range_end'] = requestParameters['start_range_end']; + } + + if (requestParameters['finish_range_begin'] != null) { + queryParameters['finish_range_begin'] = requestParameters['finish_range_begin']; + } + + if (requestParameters['finish_range_end'] != null) { + queryParameters['finish_range_end'] = requestParameters['finish_range_end']; + } + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['team_id'] != null) { + queryParameters['team_id'] = requestParameters['team_id']; + } + + if (requestParameters['series_id'] != null) { + queryParameters['series_id'] = requestParameters['series_id']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + if (requestParameters['official_only'] != null) { + queryParameters['official_only'] = requestParameters['official_only']; + } + + if (requestParameters['event_types'] != null) { + queryParameters['event_types'] = requestParameters['event_types']; + } + + if (requestParameters['category_ids'] != null) { + queryParameters['category_ids'] = requestParameters['category_ids']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/search_series`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResultsSearchSeries(requestParameters: GetResultsSearchSeriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsSearchSeriesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSeasonResultsRaw(requestParameters: GetResultsSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getResultsSeasonResults().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['event_type'] != null) { + queryParameters['event_type'] = requestParameters['event_type']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/results/season_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getResultsSeasonResults(requestParameters: GetResultsSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getResultsSeasonResultsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/SeasonApi.ts b/packages/api/client/fetch/src/apis/SeasonApi.ts new file mode 100644 index 0000000..6da7db3 --- /dev/null +++ b/packages/api/client/fetch/src/apis/SeasonApi.ts @@ -0,0 +1,237 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, + IracingEventType, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingEventTypeFromJSON, + IracingEventTypeToJSON, +} from '../models/index'; + +export interface GetSeasonListRequest { + season_year: number; + season_quarter: number; +} + +export interface GetSeasonRaceGuideRequest { + from?: Date; + include_end_after_from?: boolean; +} + +export interface GetSeasonSpectatorSubsessionIdsRequest { + event_types?: Array; +} + +export interface GetSeasonSpectatorSubsessionIdsDetailRequest { + event_types?: Array; + season_ids?: Array; +} + +/** + * + */ +export class SeasonApi extends runtime.BaseAPI { + + /** + */ + async getSeasonListRaw(requestParameters: GetSeasonListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_year'] == null) { + throw new runtime.RequiredError( + 'season_year', + 'Required parameter "season_year" was null or undefined when calling getSeasonList().' + ); + } + + if (requestParameters['season_quarter'] == null) { + throw new runtime.RequiredError( + 'season_quarter', + 'Required parameter "season_quarter" was null or undefined when calling getSeasonList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_year'] != null) { + queryParameters['season_year'] = requestParameters['season_year']; + } + + if (requestParameters['season_quarter'] != null) { + queryParameters['season_quarter'] = requestParameters['season_quarter']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/season/list`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeasonList(requestParameters: GetSeasonListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonRaceGuideRaw(requestParameters: GetSeasonRaceGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['from'] != null) { + queryParameters['from'] = requestParameters['from']; + } + + if (requestParameters['include_end_after_from'] != null) { + queryParameters['include_end_after_from'] = requestParameters['include_end_after_from']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/season/race_guide`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeasonRaceGuide(requestParameters: GetSeasonRaceGuideRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonRaceGuideRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsRaw(requestParameters: GetSeasonSpectatorSubsessionIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['event_types'] != null) { + queryParameters['event_types'] = requestParameters['event_types']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/season/spectator_subsessionids`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeasonSpectatorSubsessionIds(requestParameters: GetSeasonSpectatorSubsessionIdsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonSpectatorSubsessionIdsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetailRaw(requestParameters: GetSeasonSpectatorSubsessionIdsDetailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['event_types'] != null) { + queryParameters['event_types'] = requestParameters['event_types']; + } + + if (requestParameters['season_ids'] != null) { + queryParameters['season_ids'] = requestParameters['season_ids']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/season/spectator_subsessionids_detail`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetail(requestParameters: GetSeasonSpectatorSubsessionIdsDetailRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeasonSpectatorSubsessionIdsDetailRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/SeriesApi.ts b/packages/api/client/fetch/src/apis/SeriesApi.ts new file mode 100644 index 0000000..cdbb629 --- /dev/null +++ b/packages/api/client/fetch/src/apis/SeriesApi.ts @@ -0,0 +1,344 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetSeriesPastSeasonsRequest { + series_id: number; +} + +export interface GetSeriesSeasonListRequest { + include_series?: boolean; + season_year?: number; + season_quarter?: number; +} + +export interface GetSeriesSeasonScheduleRequest { + season_id: number; +} + +export interface GetSeriesSeasonsRequest { + include_series?: boolean; + season_year?: number; + season_quarter?: number; +} + +/** + * + */ +export class SeriesApi extends runtime.BaseAPI { + + /** + */ + async getSeriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesAssetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/assets`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeriesAssets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesAssetsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesPastSeasonsRaw(requestParameters: GetSeriesPastSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['series_id'] == null) { + throw new runtime.RequiredError( + 'series_id', + 'Required parameter "series_id" was null or undefined when calling getSeriesPastSeasons().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['series_id'] != null) { + queryParameters['series_id'] = requestParameters['series_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/past_seasons`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeriesPastSeasons(requestParameters: GetSeriesPastSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesPastSeasonsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonListRaw(requestParameters: GetSeriesSeasonListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['include_series'] != null) { + queryParameters['include_series'] = requestParameters['include_series']; + } + + if (requestParameters['season_year'] != null) { + queryParameters['season_year'] = requestParameters['season_year']; + } + + if (requestParameters['season_quarter'] != null) { + queryParameters['season_quarter'] = requestParameters['season_quarter']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/season_list`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeriesSeasonList(requestParameters: GetSeriesSeasonListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesSeasonListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonScheduleRaw(requestParameters: GetSeriesSeasonScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getSeriesSeasonSchedule().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/season_schedule`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeriesSeasonSchedule(requestParameters: GetSeriesSeasonScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesSeasonScheduleRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonsRaw(requestParameters: GetSeriesSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['include_series'] != null) { + queryParameters['include_series'] = requestParameters['include_series']; + } + + if (requestParameters['season_year'] != null) { + queryParameters['season_year'] = requestParameters['season_year']; + } + + if (requestParameters['season_quarter'] != null) { + queryParameters['season_quarter'] = requestParameters['season_quarter']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/seasons`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeriesSeasons(requestParameters: GetSeriesSeasonsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesSeasonsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesStatsSeriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/series/stats_series`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getSeriesStatsSeries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSeriesStatsSeriesRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/StatsApi.ts b/packages/api/client/fetch/src/apis/StatsApi.ts new file mode 100644 index 0000000..5608a6c --- /dev/null +++ b/packages/api/client/fetch/src/apis/StatsApi.ts @@ -0,0 +1,903 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, + IracingDivision, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingDivisionFromJSON, + IracingDivisionToJSON, +} from '../models/index'; + +export interface GetStatsMemberBestsRequest { + cust_id?: number; + car_id?: number; +} + +export interface GetStatsMemberCareerRequest { + cust_id?: number; +} + +export interface GetStatsMemberDivisionRequest { + season_id: number; + event_type: GetStatsMemberDivisionEventTypeEnum; +} + +export interface GetStatsMemberRecapRequest { + cust_id?: number; + year?: GetStatsMemberRecapYearEnum; + season?: number; +} + +export interface GetStatsMemberRecentRacesRequest { + cust_id?: number; +} + +export interface GetStatsMemberSummaryRequest { + cust_id?: number; +} + +export interface GetStatsMemberYearlyRequest { + cust_id?: number; +} + +export interface GetStatsSeasonDriverStandingsRequest { + season_id: number; + car_class_id: number; + division?: IracingDivision; + race_week_num?: number; +} + +export interface GetStatsSeasonQualifyResultsRequest { + season_id: number; + car_class_id: number; + race_week_num: number; + division?: IracingDivision; +} + +export interface GetStatsSeasonSupersessionStandingsRequest { + season_id: number; + car_class_id: number; + division?: IracingDivision; + race_week_num?: number; +} + +export interface GetStatsSeasonTeamStandingsRequest { + season_id: number; + car_class_id: number; + race_week_num?: number; +} + +export interface GetStatsSeasonTimeTrialResultsRequest { + season_id: number; + car_class_id: number; + race_week_num: number; + division?: IracingDivision; +} + +export interface GetStatsSeasonTimeTrialStandingsRequest { + season_id: number; + car_class_id: number; + division?: IracingDivision; + race_week_num?: number; +} + +export interface GetStatsWorldRecordsRequest { + car_id: number; + track_id: number; + season_year?: number; + season_quarter?: number; +} + +/** + * + */ +export class StatsApi extends runtime.BaseAPI { + + /** + */ + async getStatsMemberBestsRaw(requestParameters: GetStatsMemberBestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['car_id'] != null) { + queryParameters['car_id'] = requestParameters['car_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_bests`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberBests(requestParameters: GetStatsMemberBestsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberBestsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberCareerRaw(requestParameters: GetStatsMemberCareerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_career`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberCareer(requestParameters: GetStatsMemberCareerRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberCareerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberDivisionRaw(requestParameters: GetStatsMemberDivisionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsMemberDivision().' + ); + } + + if (requestParameters['event_type'] == null) { + throw new runtime.RequiredError( + 'event_type', + 'Required parameter "event_type" was null or undefined when calling getStatsMemberDivision().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['event_type'] != null) { + queryParameters['event_type'] = requestParameters['event_type']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_division`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberDivision(requestParameters: GetStatsMemberDivisionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberDivisionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberRecapRaw(requestParameters: GetStatsMemberRecapRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + if (requestParameters['year'] != null) { + queryParameters['year'] = requestParameters['year']; + } + + if (requestParameters['season'] != null) { + queryParameters['season'] = requestParameters['season']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_recap`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberRecap(requestParameters: GetStatsMemberRecapRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberRecapRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberRecentRacesRaw(requestParameters: GetStatsMemberRecentRacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_recent_races`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberRecentRaces(requestParameters: GetStatsMemberRecentRacesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberRecentRacesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberSummaryRaw(requestParameters: GetStatsMemberSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_summary`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberSummary(requestParameters: GetStatsMemberSummaryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberSummaryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberYearlyRaw(requestParameters: GetStatsMemberYearlyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['cust_id'] != null) { + queryParameters['cust_id'] = requestParameters['cust_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/member_yearly`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsMemberYearly(requestParameters: GetStatsMemberYearlyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsMemberYearlyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonDriverStandingsRaw(requestParameters: GetStatsSeasonDriverStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonDriverStandings().' + ); + } + + if (requestParameters['car_class_id'] == null) { + throw new runtime.RequiredError( + 'car_class_id', + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonDriverStandings().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['division'] != null) { + queryParameters['division'] = requestParameters['division']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/season_driver_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonDriverStandings(requestParameters: GetStatsSeasonDriverStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonDriverStandingsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonQualifyResultsRaw(requestParameters: GetStatsSeasonQualifyResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonQualifyResults().' + ); + } + + if (requestParameters['car_class_id'] == null) { + throw new runtime.RequiredError( + 'car_class_id', + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonQualifyResults().' + ); + } + + if (requestParameters['race_week_num'] == null) { + throw new runtime.RequiredError( + 'race_week_num', + 'Required parameter "race_week_num" was null or undefined when calling getStatsSeasonQualifyResults().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + if (requestParameters['division'] != null) { + queryParameters['division'] = requestParameters['division']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/season_qualify_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonQualifyResults(requestParameters: GetStatsSeasonQualifyResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonQualifyResultsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonSupersessionStandingsRaw(requestParameters: GetStatsSeasonSupersessionStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonSupersessionStandings().' + ); + } + + if (requestParameters['car_class_id'] == null) { + throw new runtime.RequiredError( + 'car_class_id', + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonSupersessionStandings().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['division'] != null) { + queryParameters['division'] = requestParameters['division']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/season_supersession_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonSupersessionStandings(requestParameters: GetStatsSeasonSupersessionStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonSupersessionStandingsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTeamStandingsRaw(requestParameters: GetStatsSeasonTeamStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTeamStandings().' + ); + } + + if (requestParameters['car_class_id'] == null) { + throw new runtime.RequiredError( + 'car_class_id', + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTeamStandings().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/season_team_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonTeamStandings(requestParameters: GetStatsSeasonTeamStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonTeamStandingsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTimeTrialResultsRaw(requestParameters: GetStatsSeasonTimeTrialResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTimeTrialResults().' + ); + } + + if (requestParameters['car_class_id'] == null) { + throw new runtime.RequiredError( + 'car_class_id', + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTimeTrialResults().' + ); + } + + if (requestParameters['race_week_num'] == null) { + throw new runtime.RequiredError( + 'race_week_num', + 'Required parameter "race_week_num" was null or undefined when calling getStatsSeasonTimeTrialResults().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + if (requestParameters['division'] != null) { + queryParameters['division'] = requestParameters['division']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/season_time_trial_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonTimeTrialResults(requestParameters: GetStatsSeasonTimeTrialResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonTimeTrialResultsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTimeTrialStandingsRaw(requestParameters: GetStatsSeasonTimeTrialStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['season_id'] == null) { + throw new runtime.RequiredError( + 'season_id', + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTimeTrialStandings().' + ); + } + + if (requestParameters['car_class_id'] == null) { + throw new runtime.RequiredError( + 'car_class_id', + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTimeTrialStandings().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['season_id'] != null) { + queryParameters['season_id'] = requestParameters['season_id']; + } + + if (requestParameters['car_class_id'] != null) { + queryParameters['car_class_id'] = requestParameters['car_class_id']; + } + + if (requestParameters['division'] != null) { + queryParameters['division'] = requestParameters['division']; + } + + if (requestParameters['race_week_num'] != null) { + queryParameters['race_week_num'] = requestParameters['race_week_num']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/season_time_trial_standings`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsSeasonTimeTrialStandings(requestParameters: GetStatsSeasonTimeTrialStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsSeasonTimeTrialStandingsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getStatsWorldRecordsRaw(requestParameters: GetStatsWorldRecordsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['car_id'] == null) { + throw new runtime.RequiredError( + 'car_id', + 'Required parameter "car_id" was null or undefined when calling getStatsWorldRecords().' + ); + } + + if (requestParameters['track_id'] == null) { + throw new runtime.RequiredError( + 'track_id', + 'Required parameter "track_id" was null or undefined when calling getStatsWorldRecords().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['car_id'] != null) { + queryParameters['car_id'] = requestParameters['car_id']; + } + + if (requestParameters['track_id'] != null) { + queryParameters['track_id'] = requestParameters['track_id']; + } + + if (requestParameters['season_year'] != null) { + queryParameters['season_year'] = requestParameters['season_year']; + } + + if (requestParameters['season_quarter'] != null) { + queryParameters['season_quarter'] = requestParameters['season_quarter']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/stats/world_records`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getStatsWorldRecords(requestParameters: GetStatsWorldRecordsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getStatsWorldRecordsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const GetStatsMemberDivisionEventTypeEnum = { + NUMBER_4: 4, + NUMBER_5: 5 +} as const; +export type GetStatsMemberDivisionEventTypeEnum = typeof GetStatsMemberDivisionEventTypeEnum[keyof typeof GetStatsMemberDivisionEventTypeEnum]; +/** + * @export + */ +export const GetStatsMemberRecapYearEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4 +} as const; +export type GetStatsMemberRecapYearEnum = typeof GetStatsMemberRecapYearEnum[keyof typeof GetStatsMemberRecapYearEnum]; diff --git a/packages/api/client/fetch/src/apis/TeamApi.ts b/packages/api/client/fetch/src/apis/TeamApi.ts new file mode 100644 index 0000000..a0b2854 --- /dev/null +++ b/packages/api/client/fetch/src/apis/TeamApi.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetTeamRequest { + team_id: number; + include_licenses?: boolean; +} + +/** + * + */ +export class TeamApi extends runtime.BaseAPI { + + /** + */ + async getTeamRaw(requestParameters: GetTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['team_id'] == null) { + throw new runtime.RequiredError( + 'team_id', + 'Required parameter "team_id" was null or undefined when calling getTeam().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['team_id'] != null) { + queryParameters['team_id'] = requestParameters['team_id']; + } + + if (requestParameters['include_licenses'] != null) { + queryParameters['include_licenses'] = requestParameters['include_licenses']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/team/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getTeam(requestParameters: GetTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTeamRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getTeamMembershipRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/team/membership`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getTeamMembership(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTeamMembershipRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/TimeAttackApi.ts b/packages/api/client/fetch/src/apis/TimeAttackApi.ts new file mode 100644 index 0000000..f234b5c --- /dev/null +++ b/packages/api/client/fetch/src/apis/TimeAttackApi.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +export interface GetTimeAttackMemberSeasonResultsRequest { + ta_comp_season_id: number; +} + +/** + * + */ +export class TimeAttackApi extends runtime.BaseAPI { + + /** + */ + async getTimeAttackMemberSeasonResultsRaw(requestParameters: GetTimeAttackMemberSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['ta_comp_season_id'] == null) { + throw new runtime.RequiredError( + 'ta_comp_season_id', + 'Required parameter "ta_comp_season_id" was null or undefined when calling getTimeAttackMemberSeasonResults().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['ta_comp_season_id'] != null) { + queryParameters['ta_comp_season_id'] = requestParameters['ta_comp_season_id']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/time_attack/member_season_results`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getTimeAttackMemberSeasonResults(requestParameters: GetTimeAttackMemberSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTimeAttackMemberSeasonResultsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/TrackApi.ts b/packages/api/client/fetch/src/apis/TrackApi.ts new file mode 100644 index 0000000..39692df --- /dev/null +++ b/packages/api/client/fetch/src/apis/TrackApi.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingAPIResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from '../models/index'; + +/** + * + */ +export class TrackApi extends runtime.BaseAPI { + + /** + */ + async getTrackRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/track/get`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getTrack(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackAssetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/track/assets`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + } + + /** + */ + async getTrackAssets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTrackAssetsRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/api/client/fetch/src/apis/index.ts b/packages/api/client/fetch/src/apis/index.ts new file mode 100644 index 0000000..2bd41c4 --- /dev/null +++ b/packages/api/client/fetch/src/apis/index.ts @@ -0,0 +1,19 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AuthApi'; +export * from './CarApi'; +export * from './CarclassApi'; +export * from './ConstantsApi'; +export * from './DocApi'; +export * from './DriverStatsApi'; +export * from './HostedApi'; +export * from './LeagueApi'; +export * from './LookupApi'; +export * from './MemberApi'; +export * from './ResultsApi'; +export * from './SeasonApi'; +export * from './SeriesApi'; +export * from './StatsApi'; +export * from './TeamApi'; +export * from './TimeAttackApi'; +export * from './TrackApi'; diff --git a/packages/api/client/fetch/src/index.ts b/packages/api/client/fetch/src/index.ts new file mode 100644 index 0000000..bebe8bb --- /dev/null +++ b/packages/api/client/fetch/src/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/packages/api/client/fetch/src/models/ErrorResponse.ts b/packages/api/client/fetch/src/models/ErrorResponse.ts new file mode 100644 index 0000000..0fd38ec --- /dev/null +++ b/packages/api/client/fetch/src/models/ErrorResponse.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ErrorResponse + */ +export interface ErrorResponse { + /** + * + * @type {string} + * @memberof ErrorResponse + */ + error: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + note?: string; +} + +/** + * Check if a given object implements the ErrorResponse interface. + */ +export function instanceOfErrorResponse(value: object): value is ErrorResponse { + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function ErrorResponseFromJSON(json: any): ErrorResponse { + return ErrorResponseFromJSONTyped(json, false); +} + +export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse { + if (json == null) { + return json; + } + return { + + 'error': json['error'], + 'message': json['message'] == null ? undefined : json['message'], + 'note': json['note'] == null ? undefined : json['note'], + }; +} + +export function ErrorResponseToJSON(json: any): ErrorResponse { + return ErrorResponseToJSONTyped(json, false); +} + +export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': value['error'], + 'message': value['message'], + 'note': value['note'], + }; +} + diff --git a/packages/api/client/fetch/src/models/IracingAPIResponse.ts b/packages/api/client/fetch/src/models/IracingAPIResponse.ts new file mode 100644 index 0000000..d0e29f5 --- /dev/null +++ b/packages/api/client/fetch/src/models/IracingAPIResponse.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Response from iRacing `/data` API. + * @export + * @interface IracingAPIResponse + */ +export interface IracingAPIResponse { + /** + * A link to the cached data + * @type {string} + * @memberof IracingAPIResponse + */ + link: string; + /** + * + * @type {Date} + * @memberof IracingAPIResponse + */ + expires: Date; +} + +/** + * Check if a given object implements the IracingAPIResponse interface. + */ +export function instanceOfIracingAPIResponse(value: object): value is IracingAPIResponse { + if (!('link' in value) || value['link'] === undefined) return false; + if (!('expires' in value) || value['expires'] === undefined) return false; + return true; +} + +export function IracingAPIResponseFromJSON(json: any): IracingAPIResponse { + return IracingAPIResponseFromJSONTyped(json, false); +} + +export function IracingAPIResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingAPIResponse { + if (json == null) { + return json; + } + return { + + 'link': json['link'], + 'expires': (new Date(json['expires'])), + }; +} + +export function IracingAPIResponseToJSON(json: any): IracingAPIResponse { + return IracingAPIResponseToJSONTyped(json, false); +} + +export function IracingAPIResponseToJSONTyped(value?: IracingAPIResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'link': value['link'], + 'expires': value['expires'].toISOString(), + }; +} + diff --git a/packages/api/client/fetch/src/models/IracingCategory.ts b/packages/api/client/fetch/src/models/IracingCategory.ts new file mode 100644 index 0000000..15a8428 --- /dev/null +++ b/packages/api/client/fetch/src/models/IracingCategory.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Racing category. + * @export + */ +export const IracingCategory = { + /** + * Oval discipline + */ + Oval: 'oval', + /** + * Road discipline. Legacy, use `sports_car` or `formula_car` instead. + */ + Road: 'road', + /** + * Dirt road discipline. + */ + DirtRoad: 'dirt_road', + /** + * Dirt oval discipline. + */ + DirtOval: 'dirt_oval', + /** + * Sports car discipline. + */ + SportsCar: 'sports_car', + /** + * Formula car discipline. + */ + FormulaCar: 'formula_car' +} as const; +export type IracingCategory = typeof IracingCategory[keyof typeof IracingCategory]; + + +export function instanceOfIracingCategory(value: any): boolean { + for (const key in IracingCategory) { + if (Object.prototype.hasOwnProperty.call(IracingCategory, key)) { + if (IracingCategory[key as keyof typeof IracingCategory] === value) { + return true; + } + } + } + return false; +} + +export function IracingCategoryFromJSON(json: any): IracingCategory { + return IracingCategoryFromJSONTyped(json, false); +} + +export function IracingCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingCategory { + return json as IracingCategory; +} + +export function IracingCategoryToJSON(value?: IracingCategory | null): any { + return value as any; +} + +export function IracingCategoryToJSONTyped(value: any, ignoreDiscriminator: boolean): IracingCategory { + return value as IracingCategory; +} + diff --git a/packages/api/client/fetch/src/models/IracingDivision.ts b/packages/api/client/fetch/src/models/IracingDivision.ts new file mode 100644 index 0000000..024b278 --- /dev/null +++ b/packages/api/client/fetch/src/models/IracingDivision.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. + * @export + */ +export const IracingDivision = { + /** + * Division 1 + */ + NUMBER_0: 0, + /** + * Division 2 + */ + NUMBER_1: 1, + /** + * Division 3 + */ + NUMBER_2: 2, + /** + * Division 4 + */ + NUMBER_3: 3, + /** + * Division 5 + */ + NUMBER_4: 4, + /** + * Division 6 + */ + NUMBER_5: 5, + /** + * Division 7 + */ + NUMBER_6: 6, + /** + * Division 8 + */ + NUMBER_7: 7, + /** + * Division 9 + */ + NUMBER_8: 8, + /** + * Division 10 + */ + NUMBER_9: 9, + /** + * Rookie + */ + NUMBER_10: 10 +} as const; +export type IracingDivision = typeof IracingDivision[keyof typeof IracingDivision]; + + +export function instanceOfIracingDivision(value: any): boolean { + for (const key in IracingDivision) { + if (Object.prototype.hasOwnProperty.call(IracingDivision, key)) { + if (IracingDivision[key as keyof typeof IracingDivision] === value) { + return true; + } + } + } + return false; +} + +export function IracingDivisionFromJSON(json: any): IracingDivision { + return IracingDivisionFromJSONTyped(json, false); +} + +export function IracingDivisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingDivision { + return json as IracingDivision; +} + +export function IracingDivisionToJSON(value?: IracingDivision | null): any { + return value as any; +} + +export function IracingDivisionToJSONTyped(value: any, ignoreDiscriminator: boolean): IracingDivision { + return value as IracingDivision; +} + diff --git a/packages/api/client/fetch/src/models/IracingEventType.ts b/packages/api/client/fetch/src/models/IracingEventType.ts new file mode 100644 index 0000000..f3d76e1 --- /dev/null +++ b/packages/api/client/fetch/src/models/IracingEventType.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * iRacing Event Type + * @export + */ +export const IracingEventType = { + /** + * Practice + */ + NUMBER_2: 2, + /** + * Qualifying + */ + NUMBER_3: 3, + /** + * Time trial + */ + NUMBER_4: 4, + /** + * Race + */ + NUMBER_5: 5 +} as const; +export type IracingEventType = typeof IracingEventType[keyof typeof IracingEventType]; + + +export function instanceOfIracingEventType(value: any): boolean { + for (const key in IracingEventType) { + if (Object.prototype.hasOwnProperty.call(IracingEventType, key)) { + if (IracingEventType[key as keyof typeof IracingEventType] === value) { + return true; + } + } + } + return false; +} + +export function IracingEventTypeFromJSON(json: any): IracingEventType { + return IracingEventTypeFromJSONTyped(json, false); +} + +export function IracingEventTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingEventType { + return json as IracingEventType; +} + +export function IracingEventTypeToJSON(value?: IracingEventType | null): any { + return value as any; +} + +export function IracingEventTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): IracingEventType { + return value as IracingEventType; +} + diff --git a/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts b/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts new file mode 100644 index 0000000..442c999 --- /dev/null +++ b/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { IracingServiceMethodParametersDocs } from './IracingServiceMethodParametersDocs'; +import { + IracingServiceMethodParametersDocsFromJSON, + IracingServiceMethodParametersDocsFromJSONTyped, + IracingServiceMethodParametersDocsToJSON, + IracingServiceMethodParametersDocsToJSONTyped, +} from './IracingServiceMethodParametersDocs'; + +/** + * An iRacing API Service Method object. + * @export + * @interface IracingServiceMethodDocs + */ +export interface IracingServiceMethodDocs { + /** + * + * @type {string} + * @memberof IracingServiceMethodDocs + */ + link: string; + /** + * + * @type {{ [key: string]: IracingServiceMethodParametersDocs; }} + * @memberof IracingServiceMethodDocs + */ + parameters: { [key: string]: IracingServiceMethodParametersDocs; }; + /** + * + * @type {number} + * @memberof IracingServiceMethodDocs + */ + expirationSeconds?: number; +} + +/** + * Check if a given object implements the IracingServiceMethodDocs interface. + */ +export function instanceOfIracingServiceMethodDocs(value: object): value is IracingServiceMethodDocs { + if (!('link' in value) || value['link'] === undefined) return false; + if (!('parameters' in value) || value['parameters'] === undefined) return false; + return true; +} + +export function IracingServiceMethodDocsFromJSON(json: any): IracingServiceMethodDocs { + return IracingServiceMethodDocsFromJSONTyped(json, false); +} + +export function IracingServiceMethodDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingServiceMethodDocs { + if (json == null) { + return json; + } + return { + + 'link': json['link'], + 'parameters': (mapValues(json['parameters'], IracingServiceMethodParametersDocsFromJSON)), + 'expirationSeconds': json['expirationSeconds'] == null ? undefined : json['expirationSeconds'], + }; +} + +export function IracingServiceMethodDocsToJSON(json: any): IracingServiceMethodDocs { + return IracingServiceMethodDocsToJSONTyped(json, false); +} + +export function IracingServiceMethodDocsToJSONTyped(value?: IracingServiceMethodDocs | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'link': value['link'], + 'parameters': (mapValues(value['parameters'], IracingServiceMethodParametersDocsToJSON)), + 'expirationSeconds': value['expirationSeconds'], + }; +} + diff --git a/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts b/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts new file mode 100644 index 0000000..baf1afb --- /dev/null +++ b/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * An iRacing API Service Method Parameters object. + * @export + * @interface IracingServiceMethodParametersDocs + */ +export interface IracingServiceMethodParametersDocs { + /** + * + * @type {string} + * @memberof IracingServiceMethodParametersDocs + */ + type: string; + /** + * + * @type {string} + * @memberof IracingServiceMethodParametersDocs + */ + note?: string; + /** + * + * @type {boolean} + * @memberof IracingServiceMethodParametersDocs + */ + required?: boolean; +} + +/** + * Check if a given object implements the IracingServiceMethodParametersDocs interface. + */ +export function instanceOfIracingServiceMethodParametersDocs(value: object): value is IracingServiceMethodParametersDocs { + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function IracingServiceMethodParametersDocsFromJSON(json: any): IracingServiceMethodParametersDocs { + return IracingServiceMethodParametersDocsFromJSONTyped(json, false); +} + +export function IracingServiceMethodParametersDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingServiceMethodParametersDocs { + if (json == null) { + return json; + } + return { + + 'type': json['type'], + 'note': json['note'] == null ? undefined : json['note'], + 'required': json['required'] == null ? undefined : json['required'], + }; +} + +export function IracingServiceMethodParametersDocsToJSON(json: any): IracingServiceMethodParametersDocs { + return IracingServiceMethodParametersDocsToJSONTyped(json, false); +} + +export function IracingServiceMethodParametersDocsToJSONTyped(value?: IracingServiceMethodParametersDocs | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + 'note': value['note'], + 'required': value['required'], + }; +} + diff --git a/packages/api/client/fetch/src/models/PostAuthRequest.ts b/packages/api/client/fetch/src/models/PostAuthRequest.ts new file mode 100644 index 0000000..9e40743 --- /dev/null +++ b/packages/api/client/fetch/src/models/PostAuthRequest.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface PostAuthRequest + */ +export interface PostAuthRequest { + /** + * + * @type {string} + * @memberof PostAuthRequest + */ + email: string; + /** + * + * @type {string} + * @memberof PostAuthRequest + */ + password: string; +} + +/** + * Check if a given object implements the PostAuthRequest interface. + */ +export function instanceOfPostAuthRequest(value: object): value is PostAuthRequest { + if (!('email' in value) || value['email'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function PostAuthRequestFromJSON(json: any): PostAuthRequest { + return PostAuthRequestFromJSONTyped(json, false); +} + +export function PostAuthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostAuthRequest { + if (json == null) { + return json; + } + return { + + 'email': json['email'], + 'password': json['password'], + }; +} + +export function PostAuthRequestToJSON(json: any): PostAuthRequest { + return PostAuthRequestToJSONTyped(json, false); +} + +export function PostAuthRequestToJSONTyped(value?: PostAuthRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'email': value['email'], + 'password': value['password'], + }; +} + diff --git a/packages/api/client/fetch/src/models/index.ts b/packages/api/client/fetch/src/models/index.ts new file mode 100644 index 0000000..db46696 --- /dev/null +++ b/packages/api/client/fetch/src/models/index.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './ErrorResponse'; +export * from './IracingAPIResponse'; +export * from './IracingCategory'; +export * from './IracingDivision'; +export * from './IracingEventType'; +export * from './IracingServiceMethodDocs'; +export * from './IracingServiceMethodParametersDocs'; +export * from './PostAuthRequest'; diff --git a/packages/api/client/fetch/src/runtime.ts b/packages/api/client/fetch/src/runtime.ts new file mode 100644 index 0000000..1bed172 --- /dev/null +++ b/packages/api/client/fetch/src/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing `/data` API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "https://members-ng.iracing.com".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/packages/api/client/fetch/tsconfig.json b/packages/api/client/fetch/tsconfig.json new file mode 100644 index 0000000..4567ec1 --- /dev/null +++ b/packages/api/client/fetch/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "outDir": "dist", + "lib": [ + "es6", + "dom" + ], + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} diff --git a/packages/api/doc/structure.json b/packages/api/doc/structure.json deleted file mode 100644 index 1b6d296..0000000 --- a/packages/api/doc/structure.json +++ /dev/null @@ -1,994 +0,0 @@ -{ - "car": { - "assets": { - "link": "https://members-ng.iracing.com/data/car/assets", - "note": [ - "image paths are relative to https://images-static.iracing.com/" - ], - "expirationSeconds": 900 - }, - "get": { - "link": "https://members-ng.iracing.com/data/car/get", - "expirationSeconds": 900 - } - }, - "carclass": { - "get": { - "link": "https://members-ng.iracing.com/data/carclass/get", - "expirationSeconds": 900 - } - }, - "constants": { - "categories": { - "link": "https://members-ng.iracing.com/data/constants/categories", - "note": "Constant; returned directly as an array of objects", - "expirationSeconds": 900 - }, - "divisions": { - "link": "https://members-ng.iracing.com/data/constants/divisions", - "note": "Constant; returned directly as an array of objects", - "expirationSeconds": 900 - }, - "event_types": { - "link": "https://members-ng.iracing.com/data/constants/event_types", - "note": "Constant; returned directly as an array of objects", - "expirationSeconds": 900 - } - }, - "driver_stats_by_category": { - "oval": { - "link": "https://members-ng.iracing.com/data/driver_stats_by_category/oval", - "expirationSeconds": 900 - }, - "sports_car": { - "link": "https://members-ng.iracing.com/data/driver_stats_by_category/sports_car", - "expirationSeconds": 900 - }, - "formula_car": { - "link": "https://members-ng.iracing.com/data/driver_stats_by_category/formula_car", - "expirationSeconds": 900 - }, - "road": { - "link": "https://members-ng.iracing.com/data/driver_stats_by_category/road", - "expirationSeconds": 900 - }, - "dirt_oval": { - "link": "https://members-ng.iracing.com/data/driver_stats_by_category/dirt_oval", - "expirationSeconds": 900 - }, - "dirt_road": { - "link": "https://members-ng.iracing.com/data/driver_stats_by_category/dirt_road", - "expirationSeconds": 900 - } - }, - "hosted": { - "combined_sessions": { - "link": "https://members-ng.iracing.com/data/hosted/combined_sessions", - "note": "Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user.", - "parameters": { - "package_id": { - "type": "number", - "note": "If set, return only sessions using this car or track package ID." - } - }, - "expirationSeconds": 60 - }, - "sessions": { - "link": "https://members-ng.iracing.com/data/hosted/sessions", - "note": "Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user.", - "expirationSeconds": 60 - } - }, - "league": { - "cust_league_sessions": { - "link": "https://members-ng.iracing.com/data/league/cust_league_sessions", - "parameters": { - "mine": { - "type": "boolean", - "note": "If true, return only sessions created by this user." - }, - "package_id": { - "type": "number", - "note": "If set, return only sessions using this car or track package ID." - } - }, - "expirationSeconds": 900 - }, - "directory": { - "link": "https://members-ng.iracing.com/data/league/directory", - "parameters": { - "search": { - "type": "string", - "note": "Will search against league name, description, owner, and league ID." - }, - "tag": { - "type": "string", - "note": "One or more tags, comma-separated." - }, - "restrict_to_member": { - "type": "boolean", - "note": "If true include only leagues for which customer is a member." - }, - "restrict_to_recruiting": { - "type": "boolean", - "note": "If true include only leagues which are recruiting." - }, - "restrict_to_friends": { - "type": "boolean", - "note": "If true include only leagues owned by a friend." - }, - "restrict_to_watched": { - "type": "boolean", - "note": "If true include only leagues owned by a watched member." - }, - "minimum_roster_count": { - "type": "number", - "note": "If set include leagues with at least this number of members." - }, - "maximum_roster_count": { - "type": "number", - "note": "If set include leagues with no more than this number of members." - }, - "lowerbound": { - "type": "number", - "note": "First row of results to return. Defaults to 1." - }, - "upperbound": { - "type": "number", - "note": "Last row of results to return. Defaults to lowerbound + 39." - }, - "sort": { - "type": "string", - "note": "One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance." - }, - "order": { - "type": "string", - "note": "One of asc or desc. Defaults to asc." - } - }, - "expirationSeconds": 900 - }, - "get": { - "link": "https://members-ng.iracing.com/data/league/get", - "parameters": { - "league_id": { - "type": "number", - "required": true - }, - "include_licenses": { - "type": "boolean", - "note": "For faster responses, only request when necessary." - } - }, - "expirationSeconds": 900 - }, - "get_points_systems": { - "link": "https://members-ng.iracing.com/data/league/get_points_systems", - "parameters": { - "league_id": { - "type": "number", - "required": true - }, - "season_id": { - "type": "number", - "note": "If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned." - } - }, - "expirationSeconds": 900 - }, - "membership": { - "link": "https://members-ng.iracing.com/data/league/membership", - "parameters": { - "cust_id": { - "type": "number", - "note": "If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned." - }, - "include_league": { - "type": "boolean" - } - }, - "expirationSeconds": 900 - }, - "roster": { - "link": "https://members-ng.iracing.com/data/league/roster", - "parameters": { - "league_id": { - "type": "number", - "required": true - }, - "include_licenses": { - "type": "boolean", - "note": "For faster responses, only request when necessary." - } - }, - "expirationSeconds": 900 - }, - "seasons": { - "link": "https://members-ng.iracing.com/data/league/seasons", - "parameters": { - "league_id": { - "type": "number", - "required": true - }, - "retired": { - "type": "boolean", - "note": "If true include seasons which are no longer active." - } - }, - "expirationSeconds": 900 - }, - "season_standings": { - "link": "https://members-ng.iracing.com/data/league/season_standings", - "parameters": { - "league_id": { - "type": "number", - "required": true - }, - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number" - }, - "car_id": { - "type": "number", - "note": "If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes." - } - }, - "expirationSeconds": 900 - }, - "season_sessions": { - "link": "https://members-ng.iracing.com/data/league/season_sessions", - "parameters": { - "league_id": { - "type": "number", - "required": true - }, - "season_id": { - "type": "number", - "required": true - }, - "results_only": { - "type": "boolean", - "note": "If true include only sessions for which results are available." - } - }, - "expirationSeconds": 900 - } - }, - "lookup": { - "countries": { - "link": "https://members-ng.iracing.com/data/lookup/countries", - "expirationSeconds": 900 - }, - "drivers": { - "link": "https://members-ng.iracing.com/data/lookup/drivers", - "parameters": { - "search_term": { - "type": "string", - "required": true, - "note": "A cust_id or partial name for which to search." - }, - "league_id": { - "type": "number", - "note": "Narrow the search to the roster of the given league." - } - }, - "expirationSeconds": 900 - }, - "flairs": { - "link": "https://members-ng.iracing.com/data/lookup/flairs", - "note": "Icons are from https://github.com/lipis/flag-icons/", - "expirationSeconds": 900 - }, - "get": { - "link": "https://members-ng.iracing.com/data/lookup/get", - "note": "?weather=weather_wind_speed_units&weather=weather_wind_speed_max&weather=weather_wind_speed_min&licenselevels=licenselevels", - "expirationSeconds": 900 - }, - "licenses": { - "link": "https://members-ng.iracing.com/data/lookup/licenses", - "expirationSeconds": 900 - } - }, - "member": { - "awards": { - "link": "https://members-ng.iracing.com/data/member/awards", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - } - }, - "expirationSeconds": 900 - }, - "award_instances": { - "link": "https://members-ng.iracing.com/data/member/award_instances", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - }, - "award_id": { - "type": "number", - "required": true - } - }, - "expirationSeconds": 900 - }, - "chart_data": { - "link": "https://members-ng.iracing.com/data/member/chart_data", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - }, - "category_id": { - "type": "number", - "required": true, - "note": "1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road" - }, - "chart_type": { - "type": "number", - "required": true, - "note": "1 - iRating; 2 - TT Rating; 3 - License/SR" - } - }, - "expirationSeconds": 900 - }, - "get": { - "link": "https://members-ng.iracing.com/data/member/get", - "parameters": { - "cust_ids": { - "type": "numbers", - "required": true, - "note": "?cust_ids=2,3,4" - }, - "include_licenses": { - "type": "boolean" - } - }, - "expirationSeconds": 900 - }, - "info": { - "link": "https://members-ng.iracing.com/data/member/info", - "note": "Always the authenticated member.", - "expirationSeconds": 900 - }, - "participation_credits": { - "link": "https://members-ng.iracing.com/data/member/participation_credits", - "note": "Always the authenticated member.", - "expirationSeconds": 900 - }, - "profile": { - "link": "https://members-ng.iracing.com/data/member/profile", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - } - }, - "expirationSeconds": 900 - } - }, - "results": { - "get": { - "link": "https://members-ng.iracing.com/data/results/get", - "note": "Get the results of a subsession, if authorized to view them. series_logo image paths are relative to https://images-static.iracing.com/img/logos/series/", - "parameters": { - "subsession_id": { - "type": "number", - "required": true - }, - "include_licenses": { - "type": "boolean" - } - }, - "expirationSeconds": 900 - }, - "event_log": { - "link": "https://members-ng.iracing.com/data/results/event_log", - "parameters": { - "subsession_id": { - "type": "number", - "required": true - }, - "simsession_number": { - "type": "number", - "required": true, - "note": "The main event is 0; the preceding event is -1, and so on." - } - }, - "expirationSeconds": 900 - }, - "lap_chart_data": { - "link": "https://members-ng.iracing.com/data/results/lap_chart_data", - "parameters": { - "subsession_id": { - "type": "number", - "required": true - }, - "simsession_number": { - "type": "number", - "required": true, - "note": "The main event is 0; the preceding event is -1, and so on." - } - }, - "expirationSeconds": 900 - }, - "lap_data": { - "link": "https://members-ng.iracing.com/data/results/lap_data", - "parameters": { - "subsession_id": { - "type": "number", - "required": true - }, - "simsession_number": { - "type": "number", - "required": true, - "note": "The main event is 0; the preceding event is -1, and so on." - }, - "cust_id": { - "type": "number", - "note": "Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included." - }, - "team_id": { - "type": "number", - "note": "Required if the subsession was a team event." - } - }, - "expirationSeconds": 900 - }, - "search_hosted": { - "link": "https://members-ng.iracing.com/data/results/search_hosted", - "note": "Hosted and league sessions. Maximum time frame of 90 days. Results split into one or more files with chunks of results. For scraping results the most effective approach is to keep track of the maximum end_time found during a search then make the subsequent call using that date/time as the finish_range_begin and skip any subsessions that are duplicated. Results are ordered by subsessionid which is a proxy for start time. Requires one of: start_range_begin, finish_range_begin. Requires one of: cust_id, team_id, host_cust_id, session_name.", - "parameters": { - "start_range_begin": { - "type": "string", - "note": "Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"." - }, - "start_range_end": { - "type": "string", - "note": "ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past." - }, - "finish_range_begin": { - "type": "string", - "note": "Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"." - }, - "finish_range_end": { - "type": "string", - "note": "ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past." - }, - "cust_id": { - "type": "number", - "note": "The participant's customer ID. Ignored if team_id is supplied." - }, - "team_id": { - "type": "number", - "note": "The team ID to search for. Takes priority over cust_id if both are supplied." - }, - "host_cust_id": { - "type": "number", - "note": "The host's customer ID." - }, - "session_name": { - "type": "string", - "note": "Part or all of the session's name." - }, - "league_id": { - "type": "number", - "note": "Include only results for the league with this ID." - }, - "league_season_id": { - "type": "number", - "note": "Include only results for the league season with this ID." - }, - "car_id": { - "type": "number", - "note": "One of the cars used by the session." - }, - "track_id": { - "type": "number", - "note": "The ID of the track used by the session." - }, - "category_ids": { - "type": "numbers", - "note": "Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4" - } - }, - "expirationSeconds": 900 - }, - "search_series": { - "link": "https://members-ng.iracing.com/data/results/search_series", - "note": "Official series. Maximum time frame of 90 days. Results split into one or more files with chunks of results. For scraping results the most effective approach is to keep track of the maximum end_time found during a search then make the subsequent call using that date/time as the finish_range_begin and skip any subsessions that are duplicated. Results are ordered by subsessionid which is a proxy for start time but groups together multiple splits of a series when multiple series launch sessions at the same time. Requires at least one of: season_year and season_quarter, start_range_begin, finish_range_begin.", - "parameters": { - "season_year": { - "type": "number", - "note": "Required when using season_quarter." - }, - "season_quarter": { - "type": "number", - "note": "Required when using season_year." - }, - "start_range_begin": { - "type": "string", - "note": "Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"." - }, - "start_range_end": { - "type": "string", - "note": "ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past." - }, - "finish_range_begin": { - "type": "string", - "note": "Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"." - }, - "finish_range_end": { - "type": "string", - "note": "ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past." - }, - "cust_id": { - "type": "number", - "note": "Include only sessions in which this customer participated. Ignored if team_id is supplied." - }, - "team_id": { - "type": "number", - "note": "Include only sessions in which this team participated. Takes priority over cust_id if both are supplied." - }, - "series_id": { - "type": "number", - "note": "Include only sessions for series with this ID." - }, - "race_week_num": { - "type": "number", - "note": "Include only sessions with this race week number." - }, - "official_only": { - "type": "boolean", - "note": "If true, include only sessions earning championship points. Defaults to all." - }, - "event_types": { - "type": "numbers", - "note": "Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5" - }, - "category_ids": { - "type": "numbers", - "note": "License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4" - } - }, - "expirationSeconds": 900 - }, - "season_results": { - "link": "https://members-ng.iracing.com/data/results/season_results", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "event_type": { - "type": "number", - "note": "Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race" - }, - "race_week_num": { - "type": "number", - "note": "The first race week of a season is 0." - } - }, - "expirationSeconds": 900 - } - }, - "season": { - "list": { - "link": "https://members-ng.iracing.com/data/season/list", - "parameters": { - "season_year": { - "type": "number", - "required": true - }, - "season_quarter": { - "type": "number", - "required": true - } - }, - "expirationSeconds": 900 - }, - "race_guide": { - "link": "https://members-ng.iracing.com/data/season/race_guide", - "parameters": { - "from": { - "type": "string", - "note": "ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time." - }, - "include_end_after_from": { - "type": "boolean", - "note": "Include sessions which start before 'from' but end after." - } - }, - "expirationSeconds": 60 - }, - "spectator_subsessionids": { - "link": "https://members-ng.iracing.com/data/season/spectator_subsessionids", - "parameters": { - "event_types": { - "type": "numbers", - "note": "Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5" - } - }, - "expirationSeconds": 60 - }, - "spectator_subsessionids_detail": { - "link": "https://members-ng.iracing.com/data/season/spectator_subsessionids_detail", - "parameters": { - "event_types": { - "type": "numbers", - "note": "Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5" - }, - "season_ids": { - "type": "numbers", - "note": "Seasons to include in the search. Defaults to all. ?season_ids=513,937" - } - }, - "expirationSeconds": 60 - } - }, - "series": { - "assets": { - "link": "https://members-ng.iracing.com/data/series/assets", - "note": [ - "image paths are relative to https://images-static.iracing.com/" - ], - "expirationSeconds": 900 - }, - "get": { - "link": "https://members-ng.iracing.com/data/series/get", - "expirationSeconds": 900 - }, - "past_seasons": { - "link": "https://members-ng.iracing.com/data/series/past_seasons", - "note": "Get all seasons for a series. Filter list by official:true for seasons with standings.", - "parameters": { - "series_id": { - "type": "number", - "required": true - } - }, - "expirationSeconds": 900 - }, - "seasons": { - "link": "https://members-ng.iracing.com/data/series/seasons", - "parameters": { - "include_series": { - "type": "boolean" - }, - "season_year": { - "type": "number", - "note": "To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned." - }, - "season_quarter": { - "type": "number", - "note": "To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned." - } - }, - "expirationSeconds": 900 - }, - "season_list": { - "link": "https://members-ng.iracing.com/data/series/season_list", - "parameters": { - "include_series": { - "type": "boolean" - }, - "season_year": { - "type": "number" - }, - "season_quarter": { - "type": "number" - } - }, - "expirationSeconds": 900 - }, - "season_schedule": { - "link": "https://members-ng.iracing.com/data/series/season_schedule", - "parameters": { - "season_id": { - "type": "number", - "required": true - } - }, - "expirationSeconds": 900 - }, - "stats_series": { - "link": "https://members-ng.iracing.com/data/series/stats_series", - "note": "To get series and seasons for which standings should be available, filter the list by official: true.", - "expirationSeconds": 900 - } - }, - "stats": { - "member_bests": { - "link": "https://members-ng.iracing.com/data/stats/member_bests", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - }, - "car_id": { - "type": "number", - "note": "First call should exclude car_id; use cars_driven list in return for subsequent calls." - } - }, - "expirationSeconds": 900 - }, - "member_career": { - "link": "https://members-ng.iracing.com/data/stats/member_career", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - } - }, - "expirationSeconds": 900 - }, - "member_division": { - "link": "https://members-ng.iracing.com/data/stats/member_division", - "note": "Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Always for the authenticated member.", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "event_type": { - "type": "number", - "required": true, - "note": "The event type code for the division type: 4 - Time Trial; 5 - Race" - } - }, - "expirationSeconds": 900 - }, - "member_recap": { - "link": "https://members-ng.iracing.com/data/stats/member_recap", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - }, - "year": { - "type": "number", - "note": "Season year; if not supplied the current calendar year (UTC) is used." - }, - "season": { - "type": "number", - "note": "Season (quarter) within the year; if not supplied the recap will be fore the entire year." - } - }, - "expirationSeconds": 900 - }, - "member_recent_races": { - "link": "https://members-ng.iracing.com/data/stats/member_recent_races", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - } - }, - "expirationSeconds": 900 - }, - "member_summary": { - "link": "https://members-ng.iracing.com/data/stats/member_summary", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - } - }, - "expirationSeconds": 900 - }, - "member_yearly": { - "link": "https://members-ng.iracing.com/data/stats/member_yearly", - "parameters": { - "cust_id": { - "type": "number", - "note": "Defaults to the authenticated member." - } - }, - "expirationSeconds": 900 - }, - "season_driver_standings": { - "link": "https://members-ng.iracing.com/data/stats/season_driver_standings", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number", - "required": true - }, - "division": { - "type": "number", - "note": "Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all." - }, - "race_week_num": { - "type": "number", - "note": "The first race week of a season is 0." - } - }, - "expirationSeconds": 900 - }, - "season_supersession_standings": { - "link": "https://members-ng.iracing.com/data/stats/season_supersession_standings", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number", - "required": true - }, - "division": { - "type": "number", - "note": "Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all." - }, - "race_week_num": { - "type": "number", - "note": "The first race week of a season is 0." - } - }, - "expirationSeconds": 900 - }, - "season_team_standings": { - "link": "https://members-ng.iracing.com/data/stats/season_team_standings", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number", - "required": true - }, - "race_week_num": { - "type": "number", - "note": "The first race week of a season is 0." - } - }, - "expirationSeconds": 900 - }, - "season_tt_standings": { - "link": "https://members-ng.iracing.com/data/stats/season_tt_standings", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number", - "required": true - }, - "division": { - "type": "number", - "note": "Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all." - }, - "race_week_num": { - "type": "number", - "note": "The first race week of a season is 0." - } - }, - "expirationSeconds": 900 - }, - "season_tt_results": { - "link": "https://members-ng.iracing.com/data/stats/season_tt_results", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number", - "required": true - }, - "race_week_num": { - "type": "number", - "required": true, - "note": "The first race week of a season is 0." - }, - "division": { - "type": "number", - "note": "Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all." - } - }, - "expirationSeconds": 900 - }, - "season_qualify_results": { - "link": "https://members-ng.iracing.com/data/stats/season_qualify_results", - "parameters": { - "season_id": { - "type": "number", - "required": true - }, - "car_class_id": { - "type": "number", - "required": true - }, - "race_week_num": { - "type": "number", - "required": true, - "note": "The first race week of a season is 0." - }, - "division": { - "type": "number", - "note": "Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. Defaults to all." - } - }, - "expirationSeconds": 900 - }, - "world_records": { - "link": "https://members-ng.iracing.com/data/stats/world_records", - "parameters": { - "car_id": { - "type": "number", - "required": true - }, - "track_id": { - "type": "number", - "required": true - }, - "season_year": { - "type": "number", - "note": "Limit best times to a given year." - }, - "season_quarter": { - "type": "number", - "note": "Limit best times to a given quarter; only applicable when year is used." - } - }, - "expirationSeconds": 900 - } - }, - "team": { - "get": { - "link": "https://members-ng.iracing.com/data/team/get", - "parameters": { - "team_id": { - "type": "number", - "required": true - }, - "include_licenses": { - "type": "boolean", - "note": "For faster responses, only request when necessary." - } - }, - "expirationSeconds": 900 - }, - "membership": { - "link": "https://members-ng.iracing.com/data/team/membership", - "note": "Results for the authenticated member, if any.", - "expirationSeconds": 900 - } - }, - "time_attack": { - "member_season_results": { - "link": "https://members-ng.iracing.com/data/time_attack/member_season_results", - "note": "Results for the authenticated member, if any.", - "parameters": { - "ta_comp_season_id": { - "type": "number", - "required": true - } - }, - "expirationSeconds": 900 - } - }, - "track": { - "assets": { - "link": "https://members-ng.iracing.com/data/track/assets", - "note": [ - "image paths are relative to https://images-static.iracing.com/" - ], - "expirationSeconds": 900 - }, - "get": { - "link": "https://members-ng.iracing.com/data/track/get", - "expirationSeconds": 900 - } - } -} \ No newline at end of file diff --git a/packages/api/package.json b/packages/api/package.json deleted file mode 100644 index 047cc19..0000000 --- a/packages/api/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@iracing-data/api", - "version": "0.0.2-alpha.2", - "main": "dist/index.js", - "description": "iRacing `/data` API client using axios", - "scripts": { - "build": "tsc --build tsconfig.build.json" - }, - "dependencies": { - "axios": "^1.7.9", - "axios-cookiejar-support": "^6.0.4", - "tough-cookie": "^5.1.1" - } -} \ No newline at end of file diff --git a/packages/api/router/package.json b/packages/api/router/package.json new file mode 100644 index 0000000..0678d0a --- /dev/null +++ b/packages/api/router/package.json @@ -0,0 +1,14 @@ +{ + "name": "@iracing-data/api-router", + "version": "0.0.1-alpha.0", + "description": "better-call based router for the iRacing `/data` API.", + "main": "dist/index.js", + "scripts": { + "build": "tsc --build tsconfig.build.json" + }, + "dependencies": { + "@iracing-data/api-client-fetch": "workspace:*", + "@iracing-data/api-schema": "workspace:*", + "better-call": "^1.0.26" + } +} \ No newline at end of file diff --git a/packages/api/router/src/index.ts b/packages/api/router/src/index.ts new file mode 100644 index 0000000..41974d7 --- /dev/null +++ b/packages/api/router/src/index.ts @@ -0,0 +1,19 @@ +import { createRouter as createRouterFn, RouterConfig } from "better-call"; +import { toNodeHandler } from "better-call/node"; +import * as routes from "./routes"; + +export interface CreateRouterOptions extends RouterConfig {} + +export function createRouter(options: CreateRouterOptions = {}) { + return createRouterFn( + { + ...routes, + }, + options + ); +} + +export * from "@iracing-data/api-client-fetch"; +export * from "./middleware"; +export { routes, toNodeHandler }; +export default createRouter; diff --git a/packages/api/router/src/middleware.ts b/packages/api/router/src/middleware.ts new file mode 100644 index 0000000..19b712f --- /dev/null +++ b/packages/api/router/src/middleware.ts @@ -0,0 +1,68 @@ +import { + CarApi, + CarclassApi, + Configuration, + ConstantsApi, + DocApi, + DriverStatsApi, + HostedApi, + LeagueApi, + LookupApi, + MemberApi, + ResultsApi, + SeasonApi, + SeriesApi, + StatsApi, + TeamApi, + TimeAttackApi, + TrackApi, +} from "@iracing-data/api-client-fetch"; +import { createMiddleware } from "better-call"; + +export const iracingClientMiddleware = createMiddleware( + { + requireHeaders: true, + metadata: { + openapi: { + parameters: [ + { + in: "header", + name: "X-IRACING-ACCESS-TOKEN", + schema: { + type: "string", + }, + required: true, + description: "The JWT token to sign the request with.", + }, + ], + }, + }, + }, + async ({ getHeader }) => { + const accessToken = getHeader("X-IRACING-ACCESS-TOKEN"); + const config = new Configuration({ accessToken: accessToken || undefined }); + + return { + iracing: { + car: new CarApi(config), + carClass: new CarclassApi(config), + constants: new ConstantsApi(config), + doc: new DocApi(config), + driverStats: new DriverStatsApi(config), + hosted: new HostedApi(config), + league: new LeagueApi(config), + lookup: new LookupApi(config), + member: new MemberApi(config), + results: new ResultsApi(config), + season: new SeasonApi(config), + series: new SeriesApi(config), + stats: new StatsApi(config), + team: new TeamApi(config), + timeAttack: new TimeAttackApi(config), + track: new TrackApi(config), + }, + }; + } +); + +export default iracingClientMiddleware; diff --git a/examples/oauth-example/src/routes/iracing/data/car-class.ts b/packages/api/router/src/routes/data/car-class.ts similarity index 59% rename from examples/oauth-example/src/routes/iracing/data/car-class.ts rename to packages/api/router/src/routes/data/car-class.ts index 39c7f4f..0cd1425 100644 --- a/examples/oauth-example/src/routes/iracing/data/car-class.ts +++ b/packages/api/router/src/routes/data/car-class.ts @@ -2,9 +2,11 @@ import { createEndpoint } from "../utils"; export const getCarClass = createEndpoint( "/data/carclass/get", - { method: "GET" }, + { + method: "GET", + requireHeaders: true, + }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.carClass.get(); - return response.data; + return await iracing.carClass.getCarClass(); } ); diff --git a/examples/oauth-example/src/routes/iracing/data/car.ts b/packages/api/router/src/routes/data/car.ts similarity index 59% rename from examples/oauth-example/src/routes/iracing/data/car.ts rename to packages/api/router/src/routes/data/car.ts index ee6b37d..fa4d401 100644 --- a/examples/oauth-example/src/routes/iracing/data/car.ts +++ b/packages/api/router/src/routes/data/car.ts @@ -4,11 +4,9 @@ export const carAssets = createEndpoint( "/data/car/assets", { method: "GET", - requireHeaders: true, }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.car.assets(); - return response.data; + return await iracing.car.getCarAssets(); } ); @@ -16,10 +14,8 @@ export const getCar = createEndpoint( "/data/car/get", { method: "GET", - requireHeaders: true, }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.car.get(); - return response.data; + return await iracing.car.getCar(); } ); diff --git a/examples/oauth-example/src/routes/iracing/data/constants.ts b/packages/api/router/src/routes/data/constants.ts similarity index 54% rename from examples/oauth-example/src/routes/iracing/data/constants.ts rename to packages/api/router/src/routes/data/constants.ts index b07ed7b..4ec64f6 100644 --- a/examples/oauth-example/src/routes/iracing/data/constants.ts +++ b/packages/api/router/src/routes/data/constants.ts @@ -2,27 +2,30 @@ import { createEndpoint } from "../utils"; export const categories = createEndpoint( "/data/constants/categories", - { method: "GET" }, + { + method: "GET", + }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.constants.categories(); - return response.data; + return await iracing.constants.getConstantsCategories(); } ); export const divisions = createEndpoint( "/data/constants/divisions", - { method: "GET" }, + { + method: "GET", + }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.constants.divisions(); - return response.data; + return await iracing.constants.getConstantsDivisions(); } ); export const eventTypes = createEndpoint( "/data/constants/event_types", - { method: "GET" }, + { + method: "GET", + }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.constants.eventTypes(); - return response.data; + return await iracing.constants.getConstantsEventTypes(); } ); diff --git a/packages/api/router/src/routes/data/doc.ts b/packages/api/router/src/routes/data/doc.ts new file mode 100644 index 0000000..4774aaf --- /dev/null +++ b/packages/api/router/src/routes/data/doc.ts @@ -0,0 +1,671 @@ +import { createEndpoint } from "../utils"; + +export const getDoc = createEndpoint( + "/data/doc", + { + method: "GET", + }, + async ({ context: { iracing } }) => { + return await iracing.doc.getDocs(); + } +); + +// Service docs +export const getCarClassDocs = createEndpoint( + "/data/doc/carclass", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getCarClassDocs(); + } +); + +export const getCarDocs = createEndpoint( + "/data/doc/car", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getCarDocs(); + } +); + +export const getConstantsDocs = createEndpoint( + "/data/doc/constants", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getConstantsDocs(); + } +); + +export const getDriverStatsByCategoryDocs = createEndpoint( + "/data/doc/driver_stats_by_category", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getDriverStatsByCategoryDocs(); + } +); + +export const getHostedDocs = createEndpoint( + "/data/doc/hosted", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getHostedDocs(); + } +); + +export const getLeagueDocs = createEndpoint( + "/data/doc/league", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueDocs(); + } +); + +export const getLookupDocs = createEndpoint( + "/data/doc/lookup", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLookupDocs(); + } +); + +export const getMemberDocs = createEndpoint( + "/data/doc/member", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberDocs(); + } +); + +export const getResultsDocs = createEndpoint( + "/data/doc/results", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsDocs(); + } +); + +export const getSeasonDocs = createEndpoint( + "/data/doc/season", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeasonDocs(); + } +); + +export const getSeriesDocs = createEndpoint( + "/data/doc/series", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesDocs(); + } +); + +export const getStatsDocs = createEndpoint( + "/data/doc/stats", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsDocs(); + } +); + +export const getTeamDocs = createEndpoint( + "/data/doc/team", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTeamDocs(); + } +); + +export const getTimeAttackDocs = createEndpoint( + "/data/doc/time_attack", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTimeAttackDocs(); + } +); + +export const getTrackDocs = createEndpoint( + "/data/doc/track", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTrackDocs(); + } +); + +// Service method docs (one-level deeper) +export const getCarClassGetDocs = createEndpoint( + "/data/doc/carclass/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getCarClassGetDocs(); + } +); + +export const getCarAssetsDocs = createEndpoint( + "/data/doc/car/assets", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getCarAssetsDocs(); + } +); + +export const getCarGetDocs = createEndpoint( + "/data/doc/car/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getCarGetDocs(); + } +); + +export const getConstantsCategoriesDocs = createEndpoint( + "/data/doc/constants/categories", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getConstantsCategoriesDocs(); + } +); + +export const getConstantsDivisionsDocs = createEndpoint( + "/data/doc/constants/divisions", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getConstantsDivisionsDocs(); + } +); + +export const getConstantsEventTypesDocs = createEndpoint( + "/data/doc/constants/event_types", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getConstantsEventTypesDocs(); + } +); + +export const getDriverStatsByCategoryCategoryDocs = createEndpoint( + "/data/doc/driver_stats_by_category/{category}", + { method: "GET" }, + async ({ context: { iracing }, params }) => { + return await iracing.doc.getDriverStatsByCategoryCategoryDocs({ + category: params?.category, + }); + } +); + +export const getHostedCombinedSessionsDocs = createEndpoint( + "/data/doc/hosted/combined_sessions", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getHostedCombinedSessionsDocs(); + } +); + +export const getHostedSessionsDocs = createEndpoint( + "/data/doc/hosted/sessions", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getHostedSessionsDocs(); + } +); + +export const getLeagueCustomerLeagueSessionsDocs = createEndpoint( + "/data/doc/league/cust_league_sessions", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueCustomerLeagueSessionsDocs(); + } +); + +export const getLeagueDirectoryDocs = createEndpoint( + "/data/doc/league/directory", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueDirectoryDocs(); + } +); + +export const getLeagueGetDocs = createEndpoint( + "/data/doc/league/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueGetDocs(); + } +); + +export const getLeagueGetPointsSystemsDocs = createEndpoint( + "/data/doc/league/get_points_systems", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueGetPointsSystemsDocs(); + } +); + +export const getLeagueMembershipDocs = createEndpoint( + "/data/doc/league/membership", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueMembershipDocs(); + } +); + +export const getLeagueRosterDocs = createEndpoint( + "/data/doc/league/roster", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueRosterDocs(); + } +); + +export const getLeagueSeasonsDocs = createEndpoint( + "/data/doc/league/seasons", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueSeasonsDocs(); + } +); + +export const getLeagueSeasonStandingsDocs = createEndpoint( + "/data/doc/league/season_standings", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueSeasonStandingsDocs(); + } +); + +export const getLeagueSeasonSessionsDocs = createEndpoint( + "/data/doc/league/season_sessions", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLeagueSeasonSessionsDocs(); + } +); + +export const getLookupCountriesDocs = createEndpoint( + "/data/doc/lookup/countries", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLookupCountriesDocs(); + } +); + +export const getLookupDriversDocs = createEndpoint( + "/data/doc/lookup/drivers", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLookupDriversDocs(); + } +); + +export const getLookupFlairsDocs = createEndpoint( + "/data/doc/lookup/flairs", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLookupFlairsDocs(); + } +); + +export const getLookupGetDocs = createEndpoint( + "/data/doc/lookup/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLookupGetDocs(); + } +); + +export const getLookupLicensesDocs = createEndpoint( + "/data/doc/lookup/licenses", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getLookupLicensesDocs(); + } +); + +export const getMemberAwardsDocs = createEndpoint( + "/data/doc/member/awards", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberAwardsDocs(); + } +); + +export const getMemberAwardInstancesDocs = createEndpoint( + "/data/doc/member/award_instances", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberAwardInstancesDocs(); + } +); + +export const getMemberChartDataDocs = createEndpoint( + "/data/doc/member/chart_data", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberChartDataDocs(); + } +); + +export const getMemberGetDocs = createEndpoint( + "/data/doc/member/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberGetDocs(); + } +); + +export const getMemberInfoDocs = createEndpoint( + "/data/doc/member/info", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberInfoDocs(); + } +); + +export const getMemberParticipationCreditsDocs = createEndpoint( + "/data/doc/member/participation_credits", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberParticipationCreditsDocs(); + } +); + +export const getMemberProfileDocs = createEndpoint( + "/data/doc/member/profile", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getMemberProfileDocs(); + } +); + +export const getResultsGetDocs = createEndpoint( + "/data/doc/results/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsGetDocs(); + } +); + +export const getResultsEventLogDocs = createEndpoint( + "/data/doc/results/event_log", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsEventLogDocs(); + } +); + +export const getResultsLapChartDataDocs = createEndpoint( + "/data/doc/results/lap_chart_data", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsLapChartDataDocs(); + } +); + +export const getResultsLapDataDocs = createEndpoint( + "/data/doc/results/lap_data", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsLapDataDocs(); + } +); + +export const getResultsSearchHostedDocs = createEndpoint( + "/data/doc/results/search_hosted", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsSearchHostedDocs(); + } +); + +export const getResultsSearchSeriesDocs = createEndpoint( + "/data/doc/results/search_series", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsSearchSeriesDocs(); + } +); + +export const getResultsSeasonResultsDocs = createEndpoint( + "/data/doc/results/season_results", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getResultsSeasonResultsDocs(); + } +); + +export const getSeasonListDocs = createEndpoint( + "/data/doc/season/list", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeasonListDocs(); + } +); + +export const getSeasonRaceGuideDocs = createEndpoint( + "/data/doc/season/race_guide", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeasonRaceGuideDocs(); + } +); + +export const getSeasonSpectatorSubsessionIdsDocs = createEndpoint( + "/data/doc/season/spectator_subsessionids", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeasonSpectatorSubsessionIdsDocs(); + } +); + +export const getSeasonSpectatorSubsessionIdsDetailDocs = createEndpoint( + "/data/doc/season/spectator_subsessionids_detail", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeasonSpectatorSubsessionIdsDetailDocs(); + } +); + +export const getSeriesAssetsDocs = createEndpoint( + "/data/doc/series/assets", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesAssetsDocs(); + } +); + +export const getSeriesGetDocs = createEndpoint( + "/data/doc/series/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesGetDocs(); + } +); + +export const getSeriesPastSeasonsDocs = createEndpoint( + "/data/doc/series/past_seasons", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesPastSeasonsDocs(); + } +); + +export const getSeriesSeasonsDocs = createEndpoint( + "/data/doc/series/seasons", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesSeasonsDocs(); + } +); + +export const getSeriesSeasonListDocs = createEndpoint( + "/data/doc/series/season_list", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesSeasonListDocs(); + } +); + +export const getSeriesSeasonScheduleDocs = createEndpoint( + "/data/doc/series/season_schedule", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesSeasonScheduleDocs(); + } +); + +export const getSeriesStatsSeriesDocs = createEndpoint( + "/data/doc/series/stats_series", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getSeriesStatsSeriesDocs(); + } +); + +export const getStatsMemberBestsDocs = createEndpoint( + "/data/doc/stats/member_bests", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberBestsDocs(); + } +); + +export const getStatsMemberCareerDocs = createEndpoint( + "/data/doc/stats/member_career", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberCareerDocs(); + } +); + +export const getStatsMemberDivisionDocs = createEndpoint( + "/data/doc/stats/member_division", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberDivisionDocs(); + } +); + +export const getStatsMemberRecapDocs = createEndpoint( + "/data/doc/stats/member_recap", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberRecapDocs(); + } +); + +export const getStatsMemberRecentRacesDocs = createEndpoint( + "/data/doc/stats/member_recent_races", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberRecentRacesDocs(); + } +); + +export const getStatsMemberSummaryDocs = createEndpoint( + "/data/doc/stats/member_summary", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberSummaryDocs(); + } +); + +export const getStatsMemberYearlyDocs = createEndpoint( + "/data/doc/stats/member_yearly", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsMemberYearlyDocs(); + } +); + +export const getStatsSeasonDriverStandingsDocs = createEndpoint( + "/data/doc/stats/season_driver_standings", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsSeasonDriverStandingsDocs(); + } +); + +export const getStatsSeasonSupersessionStandingsDocs = createEndpoint( + "/data/doc/stats/season_supersession_standings", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsSeasonSupersessionStandingsDocs(); + } +); + +export const getStatsSeasonTeamStandingsDocs = createEndpoint( + "/data/doc/stats/season_team_standings", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsSeasonTeamStandingsDocs(); + } +); + +export const getStatsSeasonTTStandingsDocs = createEndpoint( + "/data/doc/stats/season_tt_standings", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsSeasonTTStandingsDocs(); + } +); + +export const getStatsSeasonTTResultsDocs = createEndpoint( + "/data/doc/stats/season_tt_results", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsSeasonTTResultsDocs(); + } +); + +export const getStatsSeasonQualifyResultsDocs = createEndpoint( + "/data/doc/stats/season_qualify_results", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsSeasonQualifyResultsDocs(); + } +); + +export const getStatsWorldRecordsDocs = createEndpoint( + "/data/doc/stats/world_records", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getStatsWorldRecordsDocs(); + } +); + +export const getTeamGetDocs = createEndpoint( + "/data/doc/team/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTeamGetDocs(); + } +); + +export const getTeamMembershipDocs = createEndpoint( + "/data/doc/team/membership", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTeamMembershipDocs(); + } +); + +export const getTimeAttackMemberSeasonResultsDocs = createEndpoint( + "/data/doc/time_attack/member_season_results", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTimeAttackMemberSeasonResultsDocs(); + } +); + +export const getTrackAssetsDocs = createEndpoint( + "/data/doc/track/assets", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTrackAssetsDocs(); + } +); + +export const getTrackGetDocs = createEndpoint( + "/data/doc/track/get", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.doc.getTrackGetDocs(); + } +); diff --git a/packages/api/router/src/routes/data/driver-stats.ts b/packages/api/router/src/routes/data/driver-stats.ts new file mode 100644 index 0000000..c38228c --- /dev/null +++ b/packages/api/router/src/routes/data/driver-stats.ts @@ -0,0 +1,15 @@ +import { IRacingDriverStatsByCategoryPathSchema } from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const category = createEndpoint( + "/data/driver_stats_by_category/:category", + { + method: "GET", + requireHeaders: true, + }, + async ({ context: { iracing }, params: queryParams }) => { + return await iracing.driverStats.getDriverStatsByCategory( + await IRacingDriverStatsByCategoryPathSchema.parseAsync(queryParams) + ); + } +); diff --git a/examples/oauth-example/src/routes/iracing/data/hosted.ts b/packages/api/router/src/routes/data/hosted.ts similarity index 51% rename from examples/oauth-example/src/routes/iracing/data/hosted.ts rename to packages/api/router/src/routes/data/hosted.ts index 0bb49f8..804a804 100644 --- a/examples/oauth-example/src/routes/iracing/data/hosted.ts +++ b/packages/api/router/src/routes/data/hosted.ts @@ -1,25 +1,23 @@ +import { IRacingHostedCombinedSessionsParametersSchema } from "@iracing-data/api-schema"; import { createEndpoint } from "../utils"; -import { z } from "zod"; export const combinedSessions = createEndpoint( "/data/hosted/combined_sessions", { method: "GET", - query: z.object({ - packageId: z.number().optional(), - }), + query: IRacingHostedCombinedSessionsParametersSchema, }, async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.hosted.combinedSessions(query); - return response.data; + return await iracing.hosted.getHostedCombinedSessions(query); } ); export const sessions = createEndpoint( "/data/hosted/sessions", - { method: "GET" }, + { + method: "GET", + }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.hosted.sessions(); - return response.data; + return await iracing.hosted.getHostedSessions(); } ); diff --git a/examples/oauth-example/src/routes/iracing/data/index.ts b/packages/api/router/src/routes/data/index.ts similarity index 88% rename from examples/oauth-example/src/routes/iracing/data/index.ts rename to packages/api/router/src/routes/data/index.ts index 1448c8a..a77466e 100644 --- a/examples/oauth-example/src/routes/iracing/data/index.ts +++ b/packages/api/router/src/routes/data/index.ts @@ -1,12 +1,13 @@ export * from "./car"; export * from "./car-class"; export * from "./constants"; +export * from "./doc"; export * from "./driver-stats"; export * from "./hosted"; export * from "./league"; export * from "./lookup"; export * from "./member"; -// TODO: Results +export * from "./results"; export * from "./season"; export * from "./series"; export * from "./stats"; diff --git a/packages/api/router/src/routes/data/league.ts b/packages/api/router/src/routes/data/league.ts new file mode 100644 index 0000000..8e0b6c8 --- /dev/null +++ b/packages/api/router/src/routes/data/league.ts @@ -0,0 +1,111 @@ +import { + IRacingLeagueCustomerSessionsParametersSchema, + IRacingLeagueDirectoryParametersSchema, + IRacingLeagueGetParametersSchema, + IRacingLeagueGetPointsSystemsParametersSchema, + IRacingLeagueMembershipParametersSchema, + IRacingLeagueRosterParametersSchema, + IRacingLeagueSeasonSessionsParametersSchema, + IRacingLeagueSeasonsParametersSchema, + IRacingLeagueSeasonStandingsParametersSchema, +} from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const directory = createEndpoint( + "/data/league/directory", + { + method: "GET", + query: IRacingLeagueDirectoryParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueDirectory(query); + } +); + +export const customerLeagueSessions = createEndpoint( + "/data/league/cust_league_sessions", + { + method: "GET", + query: IRacingLeagueCustomerSessionsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueCustomerLeagueSessions(query); + } +); + +export const getLeague = createEndpoint( + "/data/league/get", + { + method: "GET", + query: IRacingLeagueGetParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeague(query); + } +); + +export const getPointsSystems = createEndpoint( + "/data/league/get_points_systems", + { + method: "GET", + query: IRacingLeagueGetPointsSystemsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeaguePointsSystems(query); + } +); + +export const leagueMembership = createEndpoint( + "/data/league/membership", + { + method: "GET", + query: IRacingLeagueMembershipParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueMembership(query); + } +); + +export const leagueRoster = createEndpoint( + "/data/league/roster", + { + method: "GET", + query: IRacingLeagueRosterParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueRoster(query); + } +); + +export const leagueSeasons = createEndpoint( + "/data/league/seasons", + { + method: "GET", + query: IRacingLeagueSeasonsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueSeasons(query); + } +); + +export const seasonStandings = createEndpoint( + "/data/league/season_standings", + { + method: "GET", + query: IRacingLeagueSeasonStandingsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueSeasonStandings(query); + } +); + +export const seasonSessions = createEndpoint( + "/data/league/season_sessions", + { + method: "GET", + query: IRacingLeagueSeasonSessionsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.league.getLeagueSeasonSessions(query); + } +); diff --git a/examples/oauth-example/src/routes/iracing/data/lookup.ts b/packages/api/router/src/routes/data/lookup.ts similarity index 53% rename from examples/oauth-example/src/routes/iracing/data/lookup.ts rename to packages/api/router/src/routes/data/lookup.ts index 82696a0..835be78 100644 --- a/examples/oauth-example/src/routes/iracing/data/lookup.ts +++ b/packages/api/router/src/routes/data/lookup.ts @@ -1,5 +1,5 @@ +import { IRacingLookupDriversParametersSchema } from "@iracing-data/api-schema"; import { createEndpoint } from "../utils"; -import { z } from "zod"; export const countries = createEndpoint( "/data/lookup/countries", @@ -7,8 +7,7 @@ export const countries = createEndpoint( method: "GET", }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.lookup.countries(); - return response.data; + return await iracing.lookup.getLookupCountries(); } ); @@ -18,8 +17,7 @@ export const flairs = createEndpoint( method: "GET", }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.lookup.flairs(); - return response.data; + return await iracing.lookup.getLookupFlairs(); } ); @@ -29,8 +27,7 @@ export const licenses = createEndpoint( method: "GET", }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.lookup.licenses(); - return response.data; + return await iracing.lookup.getLookupLicenses(); } ); @@ -38,22 +35,20 @@ export const drivers = createEndpoint( "/data/lookup/drivers", { method: "GET", - query: z.object({ - searchTerm: z.string(), - leagueId: z.number().optional(), - }), + query: IRacingLookupDriversParametersSchema, }, async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.lookup.drivers(query); - return response.data; + return await iracing.lookup.getLookupDrivers(query); } ); export const getLookup = createEndpoint( "/data/lookup/get", - { method: "GET", query: z.record(z.string(), z.string()) }, + { + method: "GET", + requireHeaders: true, + }, async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.lookup.get(query); - return response.data; + return await iracing.lookup.getLookup(); } ); diff --git a/packages/api/router/src/routes/data/member.ts b/packages/api/router/src/routes/data/member.ts new file mode 100644 index 0000000..c991d89 --- /dev/null +++ b/packages/api/router/src/routes/data/member.ts @@ -0,0 +1,83 @@ +import { createEndpoint } from "../utils"; +import { + IRacingMemberAwardInstancesParametersSchema, + IRacingMemberAwardsParametersSchema, + IRacingMemberChartDataParametersSchema, + IRacingMemberGetParametersSchema, + IRacingMemberProfileParametersSchema, +} from "@iracing-data/api-schema"; + +export const awards = createEndpoint( + "/data/member/awards", + { + method: "GET", + requireHeaders: true, + query: IRacingMemberAwardsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.member.getMemberAwards(query); + } +); + +export const awardInstances = createEndpoint( + "/data/member/award_instances", + { + method: "GET", + requireHeaders: true, + query: IRacingMemberAwardInstancesParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.member.getMemberAwardInstances(query); + } +); + +export const chartData = createEndpoint( + "/data/member/chart_data", + { + method: "GET", + query: IRacingMemberChartDataParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.member.getMemberChartData(query); + } +); + +export const getMember = createEndpoint( + "/data/member/get", + { + method: "GET", + query: IRacingMemberGetParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.member.getMember(query); + } +); + +export const info = createEndpoint( + "/data/member/info", + { + method: "GET", + }, + async ({ context: { iracing } }) => { + return await iracing.member.getMemberInfo(); + } +); + +export const participationCredits = createEndpoint( + "/data/member/participation_credits", + { method: "GET" }, + async ({ context: { iracing } }) => { + return await iracing.member.getMemberParticipationCredits(); + } +); + +export const profile = createEndpoint( + "/data/member/profile", + { + method: "GET", + query: IRacingMemberProfileParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.member.getMemberProfile(query); + } +); diff --git a/packages/api/router/src/routes/data/results.ts b/packages/api/router/src/routes/data/results.ts new file mode 100644 index 0000000..6d12499 --- /dev/null +++ b/packages/api/router/src/routes/data/results.ts @@ -0,0 +1,108 @@ +import { + IRacingResultsGetParametersSchema, + IRacingResultsEventLogParametersSchema, + IRacingResultsLapChartDataParametersSchema, + IRacingResultsLapDataParametersSchema, + IRacingResultsSearchHostedParametersSchema, + IRacingResultsSearchSeriesParametersSchema, + IRacingResultsSeasonResultsParametersSchema, +} from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const getResults = createEndpoint( + "/data/results/get", + { method: "GET", query: IRacingResultsGetParametersSchema }, + async ({ context: { iracing }, query }) => { + return await iracing.results.getResults(query); + } +); + +export const eventLog = createEndpoint( + "/data/results/event_log", + { method: "GET", query: IRacingResultsEventLogParametersSchema }, + async ({ context: { iracing }, query }) => { + return await iracing.results.getResultsEventLog(query); + } +); + +export const lapChartData = createEndpoint( + "/data/results/lap_chart_data", + { method: "GET", query: IRacingResultsLapChartDataParametersSchema }, + async ({ context: { iracing }, query }) => { + return await iracing.results.getResultsLapChartData(query); + } +); + +export const lapData = createEndpoint( + "/data/results/lap_data", + { method: "GET", query: IRacingResultsLapDataParametersSchema }, + async ({ context: { iracing }, query }) => { + return await iracing.results.getResultsLapData(query); + } +); + +export const searchHosted = createEndpoint( + "/data/results/search_hosted", + { method: "GET", query: IRacingResultsSearchHostedParametersSchema }, + async ({ + context: { iracing }, + query: { + start_range_begin, + start_range_end, + finish_range_begin, + finish_range_end, + ...query + }, + }) => { + return await iracing.results.getResultsSearchHosted({ + ...query, + start_range_begin: start_range_begin + ? new Date(start_range_begin) + : undefined, + start_range_end: start_range_end ? new Date(start_range_end) : undefined, + finish_range_begin: finish_range_begin + ? new Date(finish_range_begin) + : undefined, + finish_range_end: finish_range_end + ? new Date(finish_range_end) + : undefined, + }); + } +); + +export const searchSeries = createEndpoint( + "/data/results/search_series", + { method: "GET", query: IRacingResultsSearchSeriesParametersSchema }, + async ({ + context: { iracing }, + query: { + start_range_begin, + start_range_end, + finish_range_begin, + finish_range_end, + ...query + }, + }) => { + return await iracing.results.getResultsSearchSeries({ + ...query, + start_range_begin: start_range_begin + ? new Date(start_range_begin) + : undefined, + start_range_end: start_range_end ? new Date(start_range_end) : undefined, + finish_range_begin: finish_range_begin + ? new Date(finish_range_begin) + : undefined, + finish_range_end: finish_range_end + ? new Date(finish_range_end) + : undefined, + }); + } +); + +export const seasonResults = createEndpoint( + "/data/results/season_results", + { method: "GET", query: IRacingResultsSeasonResultsParametersSchema }, + async ({ context: { iracing }, query }) => { + return await iracing.results.getResultsSeasonResults(query); + } +); diff --git a/packages/api/router/src/routes/data/season.ts b/packages/api/router/src/routes/data/season.ts new file mode 100644 index 0000000..d18e792 --- /dev/null +++ b/packages/api/router/src/routes/data/season.ts @@ -0,0 +1,54 @@ +import { + IRacingSeasonListParametersSchema, + IRacingSeasonRaceGuideParametersSchema, + IRacingSeasonSpectatorSubsessionidsParametersSchema, + IRacingSeasonSpectatorSubsessionidsDetailParametersSchema, +} from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const list = createEndpoint( + "/data/season/list", + { + method: "GET", + query: IRacingSeasonListParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.season.getSeasonList(query); + } +); + +export const raceGuide = createEndpoint( + "/data/season/race_guide", + { + method: "GET", + query: IRacingSeasonRaceGuideParametersSchema, + }, + async ({ context: { iracing }, query: { from, ...query } }) => { + return await iracing.season.getSeasonRaceGuide({ + ...query, + from: from ? new Date(from) : undefined, + }); + } +); + +export const spectatorSubsessionIds = createEndpoint( + "/data/season/spectator_subsessionids", + { + method: "GET", + query: IRacingSeasonSpectatorSubsessionidsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.season.getSeasonSpectatorSubsessionIds(query); + } +); + +export const spectatorSubsessionIdsDetail = createEndpoint( + "/data/season/spectator_subsessionids_detail", + { + method: "GET", + query: IRacingSeasonSpectatorSubsessionidsDetailParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.season.getSeasonSpectatorSubsessionIdsDetail(query); + } +); diff --git a/packages/api/router/src/routes/data/series.ts b/packages/api/router/src/routes/data/series.ts new file mode 100644 index 0000000..7ee3386 --- /dev/null +++ b/packages/api/router/src/routes/data/series.ts @@ -0,0 +1,81 @@ +import { + IRacingSeriesPastSeasonsParametersSchema, + IRacingSeriesSeasonListParametersSchema, + IRacingSeriesSeasonScheduleParametersSchema, + IRacingSeriesSeasonsParametersSchema, +} from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const seriesAssets = createEndpoint( + "/data/series/assets", + { + method: "GET", + }, + async ({ context: { iracing } }) => { + return await iracing.series.getSeriesAssets(); + } +); + +export const getSeries = createEndpoint( + "/data/series/get", + { + method: "GET", + }, + async ({ context: { iracing } }) => { + return await iracing.series.getSeries(); + } +); + +export const pastSeasons = createEndpoint( + "/data/series/past_seasons", + { + method: "GET", + query: IRacingSeriesPastSeasonsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.series.getSeriesPastSeasons(query); + } +); + +export const seasons = createEndpoint( + "/data/series/seasons", + { + method: "GET", + query: IRacingSeriesSeasonsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.series.getSeriesSeasons(query); + } +); + +export const seasonList = createEndpoint( + "/data/series/season_list", + { + method: "GET", + query: IRacingSeriesSeasonListParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.series.getSeriesSeasonList(query); + } +); + +export const seasonSchedule = createEndpoint( + "/data/series/season_schedule", + { + method: "GET", + query: IRacingSeriesSeasonScheduleParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.series.getSeriesSeasonSchedule(query); + } +); + +export const statsSeries = createEndpoint( + "/data/series/stats_series", + { + method: "GET", + }, + async ({ context: { iracing } }) => { + return await iracing.series.getSeriesStatsSeries(); + } +); diff --git a/packages/api/router/src/routes/data/stats.ts b/packages/api/router/src/routes/data/stats.ts new file mode 100644 index 0000000..5eee1a7 --- /dev/null +++ b/packages/api/router/src/routes/data/stats.ts @@ -0,0 +1,171 @@ +import { + IRacingStatsMemberBestsParametersSchema, + IRacingStatsMemberCareerParametersSchema, + IRacingStatsMemberDivisionParametersSchema, + IRacingStatsMemberRecapParametersSchema, + IRacingStatsMemberRecentRacesParametersSchema, + IRacingStatsMemberSummaryParametersSchema, + IRacingStatsMemberYearlyParametersSchema, + IRacingStatsSeasonDriverStandingsParametersSchema, + IRacingStatsSeasonQualifyResultsParametersSchema, + IRacingStatsSeasonSupersessionStandingsParametersSchema, + IRacingStatsSeasonTeamStandingsParametersSchema, + IRacingStatsSeasonTTResultsParametersSchema, + IRacingStatsSeasonTTStandingsParametersSchema, + IRacingStatsWorldRecordsParametersSchema, +} from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const memberBests = createEndpoint( + "/data/stats/member_bests", + { + method: "GET", + query: IRacingStatsMemberBestsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberBests(query); + } +); + +export const memberCareer = createEndpoint( + "/data/stats/member_career", + { + method: "GET", + query: IRacingStatsMemberCareerParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberCareer(query); + } +); + +export const memberDivision = createEndpoint( + "/data/stats/member_division", + { + method: "GET", + query: IRacingStatsMemberDivisionParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberDivision(query); + } +); + +export const memberRecap = createEndpoint( + "/data/stats/member_recap", + { + method: "GET", + query: IRacingStatsMemberRecapParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberRecap(query); + } +); + +export const memberRecentRaces = createEndpoint( + "/data/stats/member_recent_races", + { + method: "GET", + query: IRacingStatsMemberRecentRacesParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberRecentRaces(query); + } +); + +export const memberSummary = createEndpoint( + "/data/stats/member_summary", + { + method: "GET", + query: IRacingStatsMemberSummaryParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberSummary(query); + } +); + +export const memberYearly = createEndpoint( + "/data/stats/member_yearly", + { + method: "GET", + query: IRacingStatsMemberYearlyParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsMemberYearly(query); + } +); + +export const seasonDriverStandings = createEndpoint( + "/data/stats/season_driver_standings", + { + method: "GET", + query: IRacingStatsSeasonDriverStandingsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsSeasonDriverStandings(query); + } +); + +export const seasonSupersessionStandings = createEndpoint( + "/data/stats/season_supersession_standings", + { + method: "GET", + query: IRacingStatsSeasonSupersessionStandingsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsSeasonSupersessionStandings(query); + } +); + +export const seasonTeamStandings = createEndpoint( + "/data/stats/season_team_standings", + { + method: "GET", + query: IRacingStatsSeasonTeamStandingsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsSeasonTeamStandings(query); + } +); + +export const seasonTimeTrialStandings = createEndpoint( + "/data/stats/season_time_trial_standings", + { + method: "GET", + query: IRacingStatsSeasonTTStandingsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsSeasonTimeTrialStandings(query); + } +); + +export const seasonTimeTrialResults = createEndpoint( + "/data/stats/season_time_trial_results", + { + method: "GET", + query: IRacingStatsSeasonTTResultsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsSeasonTimeTrialResults(query); + } +); + +export const seasonQualifyResults = createEndpoint( + "/data/stats/season_qualify_results", + { + method: "GET", + query: IRacingStatsSeasonQualifyResultsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsSeasonQualifyResults(query); + } +); + +export const worldRecords = createEndpoint( + "/data/stats/world_records", + { + method: "GET", + query: IRacingStatsWorldRecordsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.stats.getStatsWorldRecords(query); + } +); diff --git a/examples/oauth-example/src/routes/iracing/data/team.ts b/packages/api/router/src/routes/data/team.ts similarity index 52% rename from examples/oauth-example/src/routes/iracing/data/team.ts rename to packages/api/router/src/routes/data/team.ts index c76d156..26a9cc5 100644 --- a/examples/oauth-example/src/routes/iracing/data/team.ts +++ b/packages/api/router/src/routes/data/team.ts @@ -1,18 +1,14 @@ +import { IRacingTeamGetParametersSchema } from "@iracing-data/api-schema"; import { createEndpoint } from "../utils"; -import { z } from "zod"; export const getTeam = createEndpoint( "/data/team/get", { method: "GET", - query: z.object({ - teamId: z.number(), - includeLicenses: z.boolean().optional(), - }), + query: IRacingTeamGetParametersSchema, }, async ({ context: { iracing }, query }) => { - const response = await iracing.api.data.team.get(query); - return response.data; + return await iracing.team.getTeam(query); } ); @@ -22,7 +18,6 @@ export const membership = createEndpoint( method: "GET", }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.team.membership(); - return response.data; + return await iracing.team.getTeamMembership(); } ); diff --git a/packages/api/router/src/routes/data/time-attack.ts b/packages/api/router/src/routes/data/time-attack.ts new file mode 100644 index 0000000..bf91e37 --- /dev/null +++ b/packages/api/router/src/routes/data/time-attack.ts @@ -0,0 +1,13 @@ +import { IRacingTimeAttackMemberSeasonResultsParametersSchema } from "@iracing-data/api-schema"; +import { createEndpoint } from "../utils"; + +export const memberSeasonResults = createEndpoint( + "/data/time_attack/member_season_results", + { + method: "GET", + query: IRacingTimeAttackMemberSeasonResultsParametersSchema, + }, + async ({ context: { iracing }, query }) => { + return await iracing.timeAttack.getTimeAttackMemberSeasonResults(query); + } +); diff --git a/examples/oauth-example/src/routes/iracing/data/track.ts b/packages/api/router/src/routes/data/track.ts similarity index 59% rename from examples/oauth-example/src/routes/iracing/data/track.ts rename to packages/api/router/src/routes/data/track.ts index 1f3c75f..7318493 100644 --- a/examples/oauth-example/src/routes/iracing/data/track.ts +++ b/packages/api/router/src/routes/data/track.ts @@ -4,11 +4,9 @@ export const trackAssets = createEndpoint( "/data/track/assets", { method: "GET", - requireHeaders: true, }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.track.assets(); - return response.data; + return await iracing.track.getTrackAssets(); } ); @@ -16,10 +14,8 @@ export const getTrack = createEndpoint( "/data/track/get", { method: "GET", - requireHeaders: true, }, async ({ context: { iracing } }) => { - const response = await iracing.api.data.track.get(); - return response.data; + return await iracing.track.getTrack(); } ); diff --git a/examples/oauth-example/src/routes/iracing/index.ts b/packages/api/router/src/routes/index.ts similarity index 50% rename from examples/oauth-example/src/routes/iracing/index.ts rename to packages/api/router/src/routes/index.ts index 4e1b31a..ff7ba27 100644 --- a/examples/oauth-example/src/routes/iracing/index.ts +++ b/packages/api/router/src/routes/index.ts @@ -1,2 +1 @@ -export * from "./auth"; export * from "./data"; diff --git a/packages/api/router/src/routes/utils.ts b/packages/api/router/src/routes/utils.ts new file mode 100644 index 0000000..d3a254f --- /dev/null +++ b/packages/api/router/src/routes/utils.ts @@ -0,0 +1,6 @@ +import { createEndpoint as createEndpointFn } from "better-call"; +import { iracingClientMiddleware } from "../middleware"; + +export const createEndpoint = createEndpointFn.create({ + use: [iracingClientMiddleware], +}); diff --git a/packages/api/router/tsconfig.build.json b/packages/api/router/tsconfig.build.json new file mode 100644 index 0000000..f8efe39 --- /dev/null +++ b/packages/api/router/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "noUnusedLocals": true, + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "exclude": ["node_modules", "dist", "scripts"] +} diff --git a/packages/api/router/tsconfig.json b/packages/api/router/tsconfig.json new file mode 100644 index 0000000..5455dae --- /dev/null +++ b/packages/api/router/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": [], + "references": [{ "path": "./tsconfig.build.json" }], + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/packages/api/schema/README.md b/packages/api/schema/README.md new file mode 100644 index 0000000..c5e39aa --- /dev/null +++ b/packages/api/schema/README.md @@ -0,0 +1,9 @@ +# @iracing-data/api-schema + +## Installation + +## Usage + +## TODO: + +- [ ] Get types for all responses (after we follow the link from the default API response) diff --git a/packages/api/schema/package.json b/packages/api/schema/package.json new file mode 100644 index 0000000..dab1b23 --- /dev/null +++ b/packages/api/schema/package.json @@ -0,0 +1,13 @@ +{ + "name": "@iracing-data/api-schema", + "version": "0.0.1-alpha.0", + "description": "Zod schema for iRacing `/data` API.", + "main": "dist/index.js", + "scripts": { + "build": "tsc --build tsconfig.build.json" + }, + "dependencies": { + "zod": "^4.1.12", + "zod-openapi": "^5.4.3" + } +} \ No newline at end of file diff --git a/packages/api/schema/src/index.ts b/packages/api/schema/src/index.ts new file mode 100644 index 0000000..686fbd9 --- /dev/null +++ b/packages/api/schema/src/index.ts @@ -0,0 +1 @@ +export * from "./schema"; diff --git a/packages/api/schema/src/schema/index.ts b/packages/api/schema/src/schema/index.ts new file mode 100644 index 0000000..1a607af --- /dev/null +++ b/packages/api/schema/src/schema/index.ts @@ -0,0 +1,3 @@ +export * from "./parameters"; +export * from "./primitives"; +export * from "./responses"; diff --git a/packages/api/schema/src/schema/parameters.ts b/packages/api/schema/src/schema/parameters.ts new file mode 100644 index 0000000..7fad325 --- /dev/null +++ b/packages/api/schema/src/schema/parameters.ts @@ -0,0 +1,701 @@ +import { z } from "zod"; +import { + IRacingCategorySchema, + IRacingCustomerIdSchema, + IRacingCategoryIdParameterSchema, + IRacingChartTypeParameterSchema, + CommaSeparatedNumberString, + IRacingEventTypeSchema, + IRacingEventTypeTimeTrialSchema, + IRacingEventTypeRaceSchema, + IRacingDivisionSchema, +} from "./primitives"; + +export const IRacingAuthParametersSchema = z.object({ + email: z.email(), + password: z.string(), +}); + +export const IRacingDriverStatsByCategoryPathSchema = z.object({ + category: IRacingCategorySchema, +}); + +export const IRacingHostedCombinedSessionsParametersSchema = z.object({ + package_id: z.coerce.number().optional().meta({ + description: + "If set, return only sessions using this car or track package ID.", + }), +}); + +export const IRacingLeagueCustomerSessionsParametersSchema = z.object({ + mine: z.coerce.boolean().optional().meta({ + description: "If true, return only sessions created by this user.", + }), + package_id: z.coerce.number().optional().meta({ + description: + "If set, return only sessions using this car or track package ID.", + }), +}); + +export const IRacingLeagueDirectoryParametersSchema = z.object({ + search: z.string().optional().meta({ + description: + "Will search against league name, description, owner, and league ID.", + }), + tag: z + .string() + .optional() + .meta({ description: "One or more tags, comma-separated." }), + restrict_to_member: z.coerce.boolean().optional().meta({ + description: "If true include only leagues for which customer is a member.", + }), + restrict_to_recruiting: z.coerce.boolean().optional().meta({ + description: "If true include only leagues which are recruiting.", + }), + restrict_to_friends: z.coerce + .boolean() + .optional() + .meta({ description: "If true include only leagues owned by a friend." }), + restrict_to_watched: z.coerce.boolean().optional().meta({ + description: "If true include only leagues owned by a watched member.", + }), + minimum_roster_count: z.coerce.number().optional().meta({ + description: "If set include leagues with at least this number of members.", + }), + maximum_roster_count: z.coerce.number().optional().meta({ + description: + "If set include leagues with no more than this number of members.", + }), + lowerbound: z.coerce + .number() + .optional() + .meta({ description: "First row of results to return. Defaults to 1." }), + upperbound: z.coerce.number().optional().meta({ + description: "Last row of results to return. Defaults to lowerbound + 39.", + }), + sort: z.string().optional().meta({ + description: + "One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance.", + }), + order: z + .string() + .optional() + .meta({ description: "One of asc or desc. Defaults to asc." }), +}); + +export const IRacingLeagueGetParametersSchema = z.object({ + league_id: z.coerce.number(), + include_licenses: z.coerce.boolean().optional().meta({ + description: "For faster responses, only request when necessary.", + }), +}); + +export const IRacingLeagueGetPointsSystemsParametersSchema = z.object({ + league_id: z.coerce.number(), + season_id: z.coerce.number().optional().meta({ + description: + "If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned.", + }), +}); + +export const IRacingLeagueMembershipParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: + "If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned.", + }), + include_league: z.coerce.boolean().optional(), +}); + +export const IRacingLeagueRosterParametersSchema = z.object({ + league_id: z.coerce.number(), + include_licenses: z.coerce.boolean().optional().meta({ + description: "For faster responses, only request when necessary.", + }), +}); + +export const IRacingLeagueSeasonsParametersSchema = z.object({ + league_id: z.coerce.number(), + retired: z.coerce.boolean().optional().meta({ + description: "If true include seasons which are no longer active.", + }), +}); + +export const IRacingLeagueSeasonStandingsParametersSchema = z.object({ + league_id: z.coerce.number(), + season_id: z.coerce.number(), + car_class_id: z.coerce.number().optional(), + car_id: z.coerce.number().optional().meta({ + description: + "If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes.", + }), +}); + +export const IRacingLeagueSeasonSessionsParametersSchema = z.object({ + league_id: z.coerce.number(), + season_id: z.coerce.number(), + results_only: z.coerce.boolean().optional().meta({ + description: + "If true include only sessions for which results are available.", + }), +}); + +export const IRacingLookupDriversParametersSchema = z.object({ + search_term: z + .string() + .meta({ description: "A cust_id or partial name for which to search." }), + league_id: z.coerce.number().optional().meta({ + description: "Narrow the search to the roster of the given league.", + }), +}); + +export const IRacingMemberAwardsParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), +}); + +export const IRacingMemberAwardInstancesParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), + award_id: z.coerce.number(), +}); + +export const IRacingMemberChartDataParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), + category_id: IRacingCategoryIdParameterSchema.meta({ + description: "1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road", + }), + chart_type: IRacingChartTypeParameterSchema.meta({ + description: "1 - iRating; 2 - TT Rating; 3 - License/SR", + }), +}); + +export const IRacingMemberGetParametersSchema = z.object({ + cust_ids: CommaSeparatedNumberString.meta({ + description: + "Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4", + }), + include_licenses: z.coerce.boolean().optional(), +}); + +export const IRacingMemberProfileParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), +}); + +export const IRacingResultsGetParametersSchema = z.object({ + subsession_id: z.coerce.number(), + include_licenses: z.coerce.boolean().optional(), +}); + +export const IRacingResultsEventLogParametersSchema = z.object({ + subsession_id: z.coerce.number(), + simsession_number: z.coerce.number().meta({ + description: "The main event is 0; the preceding event is -1, and so on.", + }), +}); + +export const IRacingResultsLapChartDataParametersSchema = z.object({ + subsession_id: z.coerce.number(), + simsession_number: z.coerce.number().meta({ + description: "The main event is 0; the preceding event is -1, and so on.", + }), +}); + +export const IRacingResultsLapDataParametersSchema = z.object({ + subsession_id: z.coerce.number(), + simsession_number: z.coerce.number().meta({ + description: "The main event is 0; the preceding event is -1, and so on.", + }), + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: + "Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included.", + }), + team_id: z.coerce + .number() + .optional() + .meta({ description: "Required if the subsession was a team event." }), +}); + +export const IRacingResultsSearchHostedParametersSchema = z.object({ + start_range_begin: z.iso.datetime().optional().meta({ + description: + 'Session start times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".', + }), + start_range_end: z.iso.datetime().optional().meta({ + description: + 'ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.', + }), + finish_range_begin: z.iso.datetime().optional().meta({ + description: + 'Session finish times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".', + }), + finish_range_end: z.iso.datetime().optional().meta({ + description: + 'ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.', + }), + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: + "The participant's customer ID. Ignored if team_id is supplied.", + }), + team_id: z.coerce.number().optional().meta({ + description: + "The team ID to search for. Takes priority over cust_id if both are supplied.", + }), + host_cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "The host's customer ID.", + }), + session_name: z + .string() + .optional() + .meta({ description: "Part or all of the session's name." }), + league_id: z.coerce + .number() + .optional() + .meta({ description: "Include only results for the league with this ID." }), + league_season_id: z.coerce.number().optional().meta({ + description: "Include only results for the league season with this ID.", + }), + car_id: z.coerce + .number() + .optional() + .meta({ description: "One of the cars used by the session." }), + track_id: z.coerce + .number() + .optional() + .meta({ description: "The ID of the track used by the session." }), + category_ids: CommaSeparatedNumberString.optional().meta({ + description: + "Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4", + }), +}); + +export const IRacingResultsSearchSeriesParametersSchema = z.object({ + season_year: z.coerce + .number() + .optional() + .meta({ description: "Required when using season_quarter." }), + season_quarter: z.coerce + .number() + .optional() + .meta({ description: "Required when using season_year." }), + start_range_begin: z.iso.datetime().optional().meta({ + description: + 'Session start times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".', + }), + start_range_end: z.iso.datetime().optional().meta({ + description: + 'ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.', + }), + finish_range_begin: z.iso.datetime().optional().meta({ + description: + 'Session finish times. ISO-8601 UTC time zero offset: "2022-04-01T15:45Z".', + }), + finish_range_end: z.iso.datetime().optional().meta({ + description: + 'ISO-8601 UTC time zero offset: "2022-04-01T15:45Z". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.', + }), + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: + "Include only sessions in which this customer participated. Ignored if team_id is supplied.", + }), + team_id: z.number().optional().meta({ + description: + "Include only sessions in which this team participated. Takes priority over cust_id if both are supplied.", + }), + series_id: z.coerce + .number() + .optional() + .meta({ description: "Include only sessions for series with this ID." }), + race_week_num: z.coerce + .number() + .optional() + .meta({ description: "Include only sessions with this race week number." }), + official_only: z.coerce.boolean().optional().meta({ + description: + "If true, include only sessions earning championship points. Defaults to all.", + }), + event_types: CommaSeparatedNumberString.optional().meta({ + description: + "Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5", + }), + category_ids: CommaSeparatedNumberString.optional().meta({ + description: + "License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4", + }), +}); + +export const IRacingResultsSeasonResultsParametersSchema = z.object({ + season_id: z.coerce.number(), + event_type: IRacingEventTypeSchema.optional().meta({ + description: + "Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race", + }), + race_week_num: z.coerce + .number() + .optional() + .meta({ description: "The first race week of a season is 0." }), +}); + +export const IRacingSeasonListParametersSchema = z.object({ + season_year: z.coerce.number(), + season_quarter: z.coerce.number(), +}); + +export const IRacingSeasonRaceGuideParametersSchema = z.object({ + from: z.iso.datetime({ offset: true }).optional().meta({ + description: + "ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time.", + }), + include_end_after_from: z.coerce.boolean().optional().meta({ + description: "Include sessions which start before 'from' but end after.", + }), +}); + +export const IRacingSeasonSpectatorSubsessionidsParametersSchema = z.object({ + event_types: z.array(IRacingEventTypeSchema).optional().meta({ + description: + "Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5", + }), +}); + +export const IRacingSeasonSpectatorSubsessionidsDetailParametersSchema = + z.object({ + event_types: z.array(IRacingEventTypeSchema).optional().meta({ + description: + "Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5", + }), + season_ids: z.array(z.number()).optional().meta({ + description: + "Seasons to include in the search. Defaults to all. ?season_ids=513,937", + }), + }); + +export const IRacingSeriesPastSeasonsParametersSchema = z.object({ + series_id: z.coerce.number(), +}); + +export const IRacingSeriesSeasonsParametersSchema = z.object({ + include_series: z.coerce.boolean().optional(), + season_year: z.coerce.number().optional().meta({ + description: + "To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.", + }), + season_quarter: z.coerce.number().optional().meta({ + description: + "To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.", + }), +}); + +export const IRacingSeriesSeasonListParametersSchema = z.object({ + include_series: z.coerce.boolean().optional(), + season_year: z.coerce.number().optional(), + season_quarter: z.coerce.number().optional(), +}); + +export const IRacingSeriesSeasonScheduleParametersSchema = z.object({ + season_id: z.coerce.number(), +}); + +export const IRacingStatsMemberBestsParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), + car_id: z.coerce.number().optional().meta({ + description: + "First call should exclude car_id; use cars_driven list in return for subsequent calls.", + }), +}); + +export const IRacingStatsMemberCareerParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), +}); + +export const IRacingStatsMemberDivisionParametersSchema = z.object({ + season_id: z.coerce.number(), + event_type: z + .union([IRacingEventTypeTimeTrialSchema, IRacingEventTypeRaceSchema]) + .meta({ + description: + "The event type code for the division type: 4 - Time Trial; 5 - Race", + }), +}); + +export const IRacingStatsMemberRecapParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), + year: z + .union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]) + .optional() + .meta({ + description: + "Season year; if not supplied the current calendar year (UTC) is used.", + }), + season: z.coerce.number().optional().meta({ + description: + "Season (quarter) within the year; if not supplied the recap will be for the entire year.", + }), +}); + +export const IRacingStatsMemberRecentRacesParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), +}); + +export const IRacingStatsMemberSummaryParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), +}); + +export const IRacingStatsMemberYearlyParametersSchema = z.object({ + cust_id: IRacingCustomerIdSchema.optional().meta({ + description: "Defaults to the authenticated member.", + }), +}); + +export const IRacingStatsSeasonDriverStandingsParametersSchema = z.object({ + season_id: z.coerce.number(), + car_class_id: z.coerce.number(), + division: IRacingDivisionSchema.optional(), + race_week_num: z.coerce + .number() + .optional() + .meta({ description: "The first race week of a season is 0." }), +}); + +export const IRacingStatsSeasonSupersessionStandingsParametersSchema = z.object( + { + season_id: z.coerce.number(), + car_class_id: z.coerce.number(), + division: IRacingDivisionSchema.optional(), + race_week_num: z.coerce + .number() + .optional() + .meta({ description: "The first race week of a season is 0." }), + } +); + +export const IRacingStatsSeasonTeamStandingsParametersSchema = z.object({ + season_id: z.coerce.number(), + car_class_id: z.coerce.number(), + race_week_num: z.coerce + .number() + .optional() + .meta({ description: "The first race week of a season is 0." }), +}); + +export const IRacingStatsSeasonTTStandingsParametersSchema = z.object({ + season_id: z.coerce.number(), + car_class_id: z.coerce.number(), + division: IRacingDivisionSchema.optional(), + race_week_num: z.coerce + .number() + .optional() + .meta({ description: "The first race week of a season is 0." }), +}); + +export const IRacingStatsSeasonTTResultsParametersSchema = z.object({ + season_id: z.coerce.number(), + car_class_id: z.coerce.number(), + race_week_num: z.coerce + .number() + .meta({ description: "The first race week of a season is 0." }), + division: IRacingDivisionSchema.optional(), +}); + +export const IRacingStatsSeasonQualifyResultsParametersSchema = z.object({ + season_id: z.coerce.number(), + car_class_id: z.coerce.number(), + race_week_num: z.coerce + .number() + .meta({ description: "The first race week of a season is 0." }), + division: IRacingDivisionSchema.optional(), +}); + +export const IRacingStatsWorldRecordsParametersSchema = z.object({ + car_id: z.coerce.number(), + track_id: z.coerce.number(), + season_year: z.coerce + .number() + .optional() + .meta({ description: "Limit best times to a given year." }), + season_quarter: z.coerce.number().optional().meta({ + description: + "Limit best times to a given quarter; only applicable when year is used.", + }), +}); + +export const IRacingTeamGetParametersSchema = z.object({ + team_id: z.coerce.number(), + include_licenses: z.coerce.boolean().optional().meta({ + description: "For faster responses, only request when necessary.", + }), +}); + +export const IRacingTimeAttackMemberSeasonResultsParametersSchema = z.object({ + ta_comp_season_id: z.coerce.number(), +}); + +/** + * Types + */ +export type IRacingDriverStatsByCategoryPath = z.infer< + typeof IRacingDriverStatsByCategoryPathSchema +>; +export type IRacingHostedCombinedSessionsParameters = z.infer< + typeof IRacingHostedCombinedSessionsParametersSchema +>; +export type IRacingLeagueCustomerSessionsParameters = z.infer< + typeof IRacingLeagueCustomerSessionsParametersSchema +>; +export type IRacingLeagueDirectoryParameters = z.infer< + typeof IRacingLeagueDirectoryParametersSchema +>; +export type IRacingLeagueGetParameters = z.infer< + typeof IRacingLeagueGetParametersSchema +>; +export type IRacingLeagueGetPointsSystemsParameters = z.infer< + typeof IRacingLeagueGetPointsSystemsParametersSchema +>; +export type IRacingLeagueMembershipParameters = z.infer< + typeof IRacingLeagueMembershipParametersSchema +>; +export type IRacingLeagueRosterParameters = z.infer< + typeof IRacingLeagueRosterParametersSchema +>; +export type IRacingLeagueSeasonsParameters = z.infer< + typeof IRacingLeagueSeasonsParametersSchema +>; +export type IRacingLeagueSeasonStandingsParameters = z.infer< + typeof IRacingLeagueSeasonStandingsParametersSchema +>; +export type IRacingLeagueSeasonSessionsParameters = z.infer< + typeof IRacingLeagueSeasonSessionsParametersSchema +>; + +export type IRacingLookupDriversParameters = z.infer< + typeof IRacingLookupDriversParametersSchema +>; + +export type IRacingMemberAwardsParameters = z.infer< + typeof IRacingMemberAwardsParametersSchema +>; +export type IRacingMemberAwardInstancesParameters = z.infer< + typeof IRacingMemberAwardInstancesParametersSchema +>; +export type IRacingMemberChartDataParameters = z.infer< + typeof IRacingMemberChartDataParametersSchema +>; +export type IRacingMemberGetParameters = z.infer< + typeof IRacingMemberGetParametersSchema +>; +export type IRacingMemberProfileParameters = z.infer< + typeof IRacingMemberProfileParametersSchema +>; + +export type IRacingResultsGetParameters = z.infer< + typeof IRacingResultsGetParametersSchema +>; +export type IRacingResultsEventLogParameters = z.infer< + typeof IRacingResultsEventLogParametersSchema +>; +export type IRacingResultsLapChartDataParameters = z.infer< + typeof IRacingResultsLapChartDataParametersSchema +>; +export type IRacingResultsLapDataParameters = z.infer< + typeof IRacingResultsLapDataParametersSchema +>; +export type IRacingResultsSearchHostedParameters = z.infer< + typeof IRacingResultsSearchHostedParametersSchema +>; +export type IRacingResultsSearchSeriesParameters = z.infer< + typeof IRacingResultsSearchSeriesParametersSchema +>; +export type IRacingResultsSeasonResultsParameters = z.infer< + typeof IRacingResultsSeasonResultsParametersSchema +>; + +export type IRacingSeasonListParameters = z.infer< + typeof IRacingSeasonListParametersSchema +>; +export type IRacingSeasonRaceGuideParameters = z.infer< + typeof IRacingSeasonRaceGuideParametersSchema +>; +export type IRacingSeasonSpectatorSubsessionidsParameters = z.infer< + typeof IRacingSeasonSpectatorSubsessionidsParametersSchema +>; +export type IRacingSeasonSpectatorSubsessionidsDetailParameters = z.infer< + typeof IRacingSeasonSpectatorSubsessionidsDetailParametersSchema +>; + +export type IRacingSeriesPastSeasonsParameters = z.infer< + typeof IRacingSeriesPastSeasonsParametersSchema +>; +export type IRacingSeriesSeasonsParameters = z.infer< + typeof IRacingSeriesSeasonsParametersSchema +>; +export type IRacingSeriesSeasonListParameters = z.infer< + typeof IRacingSeriesSeasonListParametersSchema +>; +export type IRacingSeriesSeasonScheduleParameters = z.infer< + typeof IRacingSeriesSeasonScheduleParametersSchema +>; + +export type IRacingStatsMemberBestsParameters = z.infer< + typeof IRacingStatsMemberBestsParametersSchema +>; +export type IRacingStatsMemberCareerParameters = z.infer< + typeof IRacingStatsMemberCareerParametersSchema +>; +export type IRacingStatsMemberDivisionParameters = z.infer< + typeof IRacingStatsMemberDivisionParametersSchema +>; +export type IRacingStatsMemberRecapParameters = z.infer< + typeof IRacingStatsMemberRecapParametersSchema +>; +export type IRacingStatsMemberRecentRacesParameters = z.infer< + typeof IRacingStatsMemberRecentRacesParametersSchema +>; +export type IRacingStatsMemberSummaryParameters = z.infer< + typeof IRacingStatsMemberSummaryParametersSchema +>; +export type IRacingStatsMemberYearlyParameters = z.infer< + typeof IRacingStatsMemberYearlyParametersSchema +>; +export type IRacingStatsSeasonDriverStandingsParameters = z.infer< + typeof IRacingStatsSeasonDriverStandingsParametersSchema +>; +export type IRacingStatsSeasonSupersessionStandingsParameters = z.infer< + typeof IRacingStatsSeasonSupersessionStandingsParametersSchema +>; +export type IRacingStatsSeasonTeamStandingsParameters = z.infer< + typeof IRacingStatsSeasonTeamStandingsParametersSchema +>; +export type IRacingStatsSeasonTTStandingsParameters = z.infer< + typeof IRacingStatsSeasonTTStandingsParametersSchema +>; +export type IRacingStatsSeasonTTResultsParameters = z.infer< + typeof IRacingStatsSeasonTTResultsParametersSchema +>; +export type IRacingStatsSeasonQualifyResultsParameters = z.infer< + typeof IRacingStatsSeasonQualifyResultsParametersSchema +>; +export type IRacingStatsWorldRecordsParameters = z.infer< + typeof IRacingStatsWorldRecordsParametersSchema +>; + +export type IRacingTeamGetParameters = z.infer< + typeof IRacingTeamGetParametersSchema +>; +export type IRacingTimeAttackMemberSeasonResultsParameters = z.infer< + typeof IRacingTimeAttackMemberSeasonResultsParametersSchema +>; diff --git a/packages/api/schema/src/schema/primitives.ts b/packages/api/schema/src/schema/primitives.ts new file mode 100644 index 0000000..4037bd9 --- /dev/null +++ b/packages/api/schema/src/schema/primitives.ts @@ -0,0 +1,213 @@ +import { z } from "zod"; + +export const IRacingAccessTokenSchema = z.jwt().meta({ + description: "JWT ID Token from iRacing OAuth Service", + id: "iracingAccessToken", +}); + +export const IRacingRateLimitLimitHeaderKey = "x-ratelimit-limit"; +export const IRacingRateLimitLimitHeaderSchema = z.number().meta({ + title: "Rate limit limit", + description: "The current total rate limit.", + header: { + id: IRacingRateLimitLimitHeaderKey, + }, +}); + +export const IRacingRateLimitRemainingHeaderKey = "x-ratelimit-remaining"; +export const IRacingRateLimitRemainingHeaderSchema = z.number().meta({ + title: "Rate limit remaining", + description: "How much of the rate limit you have remaining.", + header: { + id: IRacingRateLimitRemainingHeaderKey, + }, +}); + +export const IRacingRateLimitResetHeaderKey = "x-ratelimit-reset"; +export const IRacingRateLimitResetHeaderSchema = z + .codec(z.int().min(0), z.date(), { + decode: (millis) => new Date(millis), + encode: (date) => date.getTime(), + }) + .meta({ + title: "Rate limit reset", + description: "When the rate limit will reset in epoch timestamp.", + header: { + id: IRacingRateLimitResetHeaderKey, + }, + }); + +export const IRacingRateLimitHeadersSchema = z + .object({ + [IRacingRateLimitLimitHeaderKey]: IRacingRateLimitLimitHeaderSchema, + [IRacingRateLimitRemainingHeaderKey]: IRacingRateLimitRemainingHeaderSchema, + [IRacingRateLimitResetHeaderKey]: IRacingRateLimitResetHeaderSchema, + }) + .meta({ + title: "Rate limit headers", + description: + "Headers included with every request, indicating current rate limit status for the requesting session.", + }); + +export const IRacingCustomerIdSchema = z.coerce.number().meta({ + description: "Numeric ID of a customer on iRacing.", + id: "customerId", +}); + +export const CommaSeparatedNumberString = z.string().regex(/^\d+(?:,\d+)*$/, { + message: "Parameter must be a comma-separated list of numbers, e.g. '2,3,4'", +}); + +export const IRacingEventTypePracticeSchema = z + .literal(2) + .meta({ description: "Practice" }); + +export const IRacingEventTypeQualifyingSchema = z + .literal(3) + .meta({ description: "Qualifying" }); + +export const IRacingEventTypeTimeTrialSchema = z + .literal(4) + .meta({ description: "Time trial" }); + +export const IRacingEventTypeRaceSchema = z + .literal(5) + .meta({ description: "Race" }); + +export const IRacingEventTypeSchema = z + .union([ + IRacingEventTypePracticeSchema, + IRacingEventTypeQualifyingSchema, + IRacingEventTypeTimeTrialSchema, + IRacingEventTypeRaceSchema, + ]) + .meta({ + id: "iracingEventType", + description: "iRacing Event Type", + }); + +export const IRacingChartTypeSchema = z + .union([ + z.literal(1).meta({ description: "iRating" }), + z.literal(2).meta({ description: "Time trial rating" }), + z.literal(3).meta({ description: "License rating" }), + ]) + .meta({ + id: "iracingChartType", + description: "iRacing Chart Type", + }); + +export const IRacingChartTypeParameterSchema = z.coerce + .number() + .pipe(IRacingChartTypeSchema); + +export const IRacingCategorySchema = z + .union([ + z.literal("oval").meta({ description: "Oval discipline" }), + z.literal("road").meta({ + description: + "Road discipline. Legacy, use `sports_car` or `formula_car` instead.", + }), + z.literal("dirt_road").meta({ description: "Dirt road discipline." }), + z.literal("dirt_oval").meta({ description: "Dirt oval discipline." }), + z.literal("sports_car").meta({ description: "Sports car discipline." }), + z.literal("formula_car").meta({ description: "Formula car discipline." }), + ]) + .meta({ + description: "Racing category.", + id: "iracingCategory", + }); + +export const IRacingCategoryIdSchema = z + .union([ + z.literal(1).meta({ description: "Oval" }), + z.literal(2).meta({ description: "Road" }), + z.literal(3).meta({ description: "Dirt Oval" }), + z.literal(4).meta({ description: "Dirt Road" }), + z.literal(5).meta({ description: "Sports car" }), + z.literal(6).meta({ description: "Formula" }), + ]) + .meta({ + description: "Racing category ID.", + id: "iracingCategoryId", + }); + +export const IRacingCategoryIdParameterSchema = z.coerce + .number() + .pipe(IRacingCategoryIdSchema); + +export const IRacingDivisionSchema = z + .union([ + z.literal(0).meta({ + description: "Division 1", + }), + z.literal(1).meta({ + description: "Division 2", + }), + z.literal(2).meta({ + description: "Division 3", + }), + z.literal(3).meta({ + description: "Division 4", + }), + z.literal(4).meta({ + description: "Division 5", + }), + z.literal(5).meta({ + description: "Division 6", + }), + z.literal(6).meta({ + description: "Division 7", + }), + z.literal(7).meta({ + description: "Division 8", + }), + z.literal(8).meta({ + description: "Division 9", + }), + z.literal(9).meta({ + description: "Division 10", + }), + z.literal(10).meta({ + description: "Rookie", + }), + ]) + .meta({ + description: + "iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information.", + id: "iracingDivision", + }); + +/** + * Types + */ + +export type IRacingAccessToken = z.infer; +export type IRacingRateLimitLimitHeader = z.infer< + typeof IRacingRateLimitLimitHeaderSchema +>; +export type IRacingRateLimitRemainingHeader = z.infer< + typeof IRacingRateLimitRemainingHeaderSchema +>; +export type IRacingRateLimitResetHeader = z.infer< + typeof IRacingRateLimitResetHeaderSchema +>; +export type IRacingRateLimitHeaders = z.infer< + typeof IRacingRateLimitHeadersSchema +>; +export type IRacingCustomerId = z.infer; +export type IRacingCategory = z.infer; +export type IRacingDivision = z.infer; +export type IRacingEventTypePractice = z.infer< + typeof IRacingEventTypePracticeSchema +>; +export type IRacingEventTypeQualifying = z.infer< + typeof IRacingEventTypeQualifyingSchema +>; +export type IRacingEventTypeTimeTrial = z.infer< + typeof IRacingEventTypeTimeTrialSchema +>; +export type IRacingEventTypeRace = z.infer; +export type IRacingEventType = z.infer; + +export type IRacingChartType = z.infer; diff --git a/packages/api/schema/src/schema/responses.ts b/packages/api/schema/src/schema/responses.ts new file mode 100644 index 0000000..cd8e304 --- /dev/null +++ b/packages/api/schema/src/schema/responses.ts @@ -0,0 +1,123 @@ +import { z } from "zod"; + +export const IRacingErrorResponseSchema = z + .object({ + error: z.string(), + message: z.string().optional(), + note: z.string().optional(), + }) + .meta({ + id: "errorResponse", + }); + +export const IRacingAPIResponseSchema = z + .object({ + link: z.url().meta({ description: "A link to the cached data" }), + expires: z.iso.datetime(), + }) + .meta({ + description: "Response from iRacing `/data` API.", + id: "iracingAPIResponse", + }); + +export const IRacingServiceMethodParametersDocsResponseSchema = z + .object({ + type: z.string(), + note: z.string().optional(), + required: z.coerce.boolean().optional(), + }) + .meta({ + description: "An iRacing API Service Method Parameters object.", + id: "iracingServiceMethodParametersDocs", + }); + +export const IRacingServiceMethodDocsResponseSchema = z + .object({ + link: z.url(), + parameters: z.record( + z.string(), + IRacingServiceMethodParametersDocsResponseSchema + ), + expirationSeconds: z.coerce.number().optional(), + }) + .meta({ + description: "An iRacing API Service Method object.", + id: "iracingServiceMethodDocs", + }); + +export const IRacingServiceDocsResponseSchema = z + .record(z.string(), IRacingServiceMethodDocsResponseSchema) + .meta({ + description: + "An index of service methods available for the requested service.", + id: "iracingServiceDocs", + }); + +export const IRacingServicesDocsResponseSchema = z + .record(z.string(), IRacingServiceDocsResponseSchema) + .meta({ + description: "An index of available services on the iRacing API.", + id: "iracingServicesDocs", + }); + +/** + * Route link responses. + * These are provided as a convenience and are non-exhaustive. + */ + +export const IRacingGetCarAssetsResponseSchema = z.record( + z.number(), + z.unknown() +); + +export const IRacingGetCarResponseSchema = z.array( + z.object({ + car_id: z.number(), + }) +); + +export const IRacingGetTrackAssetsResponseSchema = z.record( + z.number(), + z.object({ + track_id: z.number(), + track_map: z.string(), + track_map_layers: z.record(z.string(), z.string()), + }) +); + +export const IRacingGetTrackResponseSchema = z.array( + z.object({ + track_id: z.number(), + }) +); + +/** + * Types + */ + +export type IRacingErrorResponse = z.infer; +export type IRacingAPIResponse = z.infer; + +export type IRacingServiceMethodParametersDocsResponse = z.infer< + typeof IRacingServiceMethodParametersDocsResponseSchema +>; +export type IRacingServiceMethodDocsResponse = z.infer< + typeof IRacingServiceMethodDocsResponseSchema +>; +export type IRacingServiceDocsResponse = z.infer< + typeof IRacingServiceDocsResponseSchema +>; +export type IRacingServicesDocsResponse = z.infer< + typeof IRacingServicesDocsResponseSchema +>; + +export type IRacingGetCarAssetsResponse = z.infer< + typeof IRacingGetCarAssetsResponseSchema +>; +export type IRacingGetCarResponse = z.infer; +export type IRacingGetTrackAssetsResponse = z.infer< + typeof IRacingGetTrackAssetsResponseSchema +>; +export type IRacingGetTrackResponse = z.infer< + typeof IRacingGetTrackResponseSchema +>; diff --git a/packages/api/schema/tsconfig.build.json b/packages/api/schema/tsconfig.build.json new file mode 100644 index 0000000..f8efe39 --- /dev/null +++ b/packages/api/schema/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "noUnusedLocals": true, + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "exclude": ["node_modules", "dist", "scripts"] +} diff --git a/packages/api/schema/tsconfig.json b/packages/api/schema/tsconfig.json new file mode 100644 index 0000000..5455dae --- /dev/null +++ b/packages/api/schema/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": [], + "references": [{ "path": "./tsconfig.build.json" }], + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/packages/api/src/api/README.md b/packages/api/src/api/README.md deleted file mode 100644 index c3beb97..0000000 --- a/packages/api/src/api/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# API Module Documentation - -## Overview - -Supported routes are defined in the subdirectories. Each subdirectory represents an API provided by iRacing. - -i.e. `data` represents the `/data` route. `data/car` represents the `/data/car` route. The root (this directory) represents the `/` route. - -## Adding a route - -To add a new route, navigate to the appropriate subdirectory and edit the `index.ts` file, or create a new subdirectory. - -### Example: New route to existing resource - -To add a new route `/data/track`, edit the existing `TrackAPI` class in `index.ts` in `./data/track`. -Add a function that represents the request to the endpoint. - -```typescript -export class TrackAPI extends NetworkClientProvider { - // ... existing implementation - - newRoute() { - return this.client.get("/data/track/newRoute"); - } -} -``` - -### Example: New route with new resource - -Create a new subdirectory in the appropriate directory and add an `index.ts` file. Define a new class that represents the API resource -and extends `NetworkClientProvider` to get access to the Axios client. - -```typescript -export class NewAPI extends NetworkClientProvider { - resourceEndpoint() { - return this.client.get("/new/route"); - } -} -``` - -Add the API class to the parent class, if appropriate. In this example, let's consider that `/new` is a new resource under the `data` resource. Add the new class to the `DataAPI` class: - -```typescript -// ... Existing import -import { NewAPI } from './new'; - -export class DataAPI extends NetworkClientProvider { - // ... existing implementation - private _new: NewAPI; - get new() { - return this._new; - } - - constructor(client: AxiosInstance) { - // ... existing initialization - this._new = new NewAPI(client); - } -} -``` diff --git a/packages/api/src/api/auth/index.ts b/packages/api/src/api/auth/index.ts deleted file mode 100644 index 4f67464..0000000 --- a/packages/api/src/api/auth/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { NetworkClientProvider } from "../types"; -import { hashPassword } from "../../util"; -import assert from "node:assert"; - -export class AuthAPI extends NetworkClientProvider { - async auth({ - username, - password, - hashedPassword, - }: { - username: string; - password?: string; - hashedPassword?: string; - }) { - assert( - password || hashedPassword, - "`password` or `hashedPassword` is required." - ); - - let normalizedPassword = hashedPassword; - if (!normalizedPassword && password) { - normalizedPassword = await hashPassword(username, password); - } - - return this.client.post("/auth", { - email: username, - password: normalizedPassword, - }); - } -} - -export default AuthAPI; diff --git a/packages/api/src/api/data/car-class/index.ts b/packages/api/src/api/data/car-class/index.ts deleted file mode 100644 index b012555..0000000 --- a/packages/api/src/api/data/car-class/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NetworkClientProvider, IRacingAPIResponse } from "../../types"; - -export class CarClassAPI extends NetworkClientProvider { - get() { - return this.client.get("/data/carclass/get"); - } -} - -export default CarClassAPI; diff --git a/packages/api/src/api/data/car/index.ts b/packages/api/src/api/data/car/index.ts deleted file mode 100644 index 800d9d5..0000000 --- a/packages/api/src/api/data/car/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NetworkClientProvider, IRacingAPIResponse } from "../../types"; - -export class CarAPI extends NetworkClientProvider { - /** - * Get car assets - * Image paths are relative to https://images-static.iracing.com/ - */ - assets() { - return this.client.get("/data/car/assets"); - } - - get() { - return this.client.get("/data/car/get"); - } -} - -export default CarAPI; diff --git a/packages/api/src/api/data/constants/index.ts b/packages/api/src/api/data/constants/index.ts deleted file mode 100644 index 39bcbba..0000000 --- a/packages/api/src/api/data/constants/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NetworkClientProvider, IRacingAPIResponse } from "../../types"; - -export class ConstantsAPI extends NetworkClientProvider { - categories() { - return this.client.get("/data/constants/categories"); - } - - divisions() { - return this.client.get("/data/constants/divisions"); - } - - eventTypes() { - return this.client.get("/data/constants/event_types"); - } -} - -export default ConstantsAPI; diff --git a/packages/api/src/api/data/driver-stats/index.ts b/packages/api/src/api/data/driver-stats/index.ts deleted file mode 100644 index 3e474e0..0000000 --- a/packages/api/src/api/data/driver-stats/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - NetworkClientProvider, - CategoryValue, - IRacingAPIResponse, -} from "../../types"; - -export class DriverStatsAPI extends NetworkClientProvider { - category({ category }: { category: CategoryValue }) { - return this.client.get( - `/data/driver_stats_by_category/${category}` - ); - } -} - -export default DriverStatsAPI; diff --git a/packages/api/src/api/data/hosted/index.ts b/packages/api/src/api/data/hosted/index.ts deleted file mode 100644 index de55287..0000000 --- a/packages/api/src/api/data/hosted/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { IRacingAPIResponse, NetworkClientProvider } from "../../types"; - -export class HostedAPI extends NetworkClientProvider { - /** - * Sessions that can be joined as a driver or spectator, and also includes - * non-league pending sessions for the user. - */ - combinedSessions({ packageId }: { packageId?: number } = {}) { - return this.client.get( - `/data/hosted/combined_sessions`, - { - params: { package_id: packageId }, - } - ); - } - - /** - * Sessions that can be joined as a driver. Without spectator and non-league - * pending sessions for the user. - */ - sessions() { - return this.client.get("/data/hosted/sessions"); - } -} - -export default HostedAPI; diff --git a/packages/api/src/api/data/index.ts b/packages/api/src/api/data/index.ts deleted file mode 100644 index 8b63149..0000000 --- a/packages/api/src/api/data/index.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { AxiosInstance } from "axios"; -import { NetworkClientProvider } from "../types"; -import { CarAPI } from "./car"; -import { CarClassAPI } from "./car-class"; -import { ConstantsAPI } from "./constants"; -import { DriverStatsAPI } from "./driver-stats"; -import { HostedAPI } from "./hosted"; -import { LeagueAPI } from "./league"; -import { LookupAPI } from "./lookup"; -import { MemberAPI } from "./member"; -import { ResultsAPI } from "./results"; -import { SeasonAPI } from "./season"; -import { SeriesAPI } from "./series"; -import { StatsAPI } from "./stats"; -import { TeamAPI } from "./team"; -import { TimeAttackAPI } from "./time-attack"; -import { TrackAPI } from "./track"; - -export class DataAPI extends NetworkClientProvider { - private _car: CarAPI; - get car() { - return this._car; - } - - private _carClass: CarClassAPI; - get carClass() { - return this._carClass; - } - - private _constants: ConstantsAPI; - get constants() { - return this._constants; - } - - private _driverStats: DriverStatsAPI; - get driverStats() { - return this._driverStats; - } - - private _hosted: HostedAPI; - get hosted() { - return this._hosted; - } - - private _league: LeagueAPI; - get league() { - return this._league; - } - - private _lookup: LookupAPI; - get lookup() { - return this._lookup; - } - - private _member: MemberAPI; - get member() { - return this._member; - } - - private _results: ResultsAPI; - get results() { - return this._results; - } - - private _season: SeasonAPI; - get season() { - return this._season; - } - - private _series: SeriesAPI; - get series() { - return this._series; - } - - private _stats: StatsAPI; - get stats() { - return this._stats; - } - - private _team: TeamAPI; - get team() { - return this._team; - } - - private _timeAttack: TimeAttackAPI; - get timeAttack() { - return this._timeAttack; - } - - private _track: TrackAPI; - get track() { - return this._track; - } - - constructor(client: AxiosInstance) { - super(client); - this._car = new CarAPI(client); - this._carClass = new CarClassAPI(client); - this._constants = new ConstantsAPI(client); - this._driverStats = new DriverStatsAPI(client); - this._hosted = new HostedAPI(client); - this._league = new LeagueAPI(client); - this._lookup = new LookupAPI(client); - this._member = new MemberAPI(client); - this._results = new ResultsAPI(client); - this._season = new SeasonAPI(client); - this._series = new SeriesAPI(client); - this._stats = new StatsAPI(client); - this._team = new TeamAPI(client); - this._timeAttack = new TimeAttackAPI(client); - this._track = new TrackAPI(client); - } - - async doc() { - return this.client.get("/data/doc"); - } -} diff --git a/packages/api/src/api/data/league/index.ts b/packages/api/src/api/data/league/index.ts deleted file mode 100644 index 93f43ae..0000000 --- a/packages/api/src/api/data/league/index.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { IRacingAPIResponse, NetworkClientProvider } from "../../types"; - -export class LeagueAPI extends NetworkClientProvider { - directory({ - search, - tag, - restrictToMember, - restrictToRecruiting, - restrictToFriends, - restrictToWatched, - minimumRosterCount, - maximumRosterCount, - lowerbound, - upperbound, - sort, - order, - }: { - search?: string; - tag?: string; - restrictToMember?: boolean; - restrictToRecruiting?: boolean; - restrictToFriends?: boolean; - restrictToWatched?: boolean; - minimumRosterCount?: number; - maximumRosterCount?: number; - lowerbound?: number; - upperbound?: number; - sort?: "relevance" | "leaguename" | "displayname" | "rostercount"; - order?: "asc" | "desc"; - } = {}) { - return this.client.get("/data/league/directory", { - params: { - search, - tag, - restrict_to_member: restrictToMember, - restrict_to_recruiting: restrictToRecruiting, - restrict_to_friends: restrictToFriends, - restrict_to_watched: restrictToWatched, - minimum_roster_count: minimumRosterCount, - maximum_roster_count: maximumRosterCount, - lowerbound, - upperbound, - sort, - order, - }, - }); - } - - customerLeagueSessions({ - mine, - packageId, - }: { - mine?: boolean; - packageId?: number; - } = {}) { - return this.client.get( - "/data/league/cust_league_sessions", - { - params: { mine, package_id: packageId }, - } - ); - } - - get({ - leagueId, - includeLicenses, - }: { - leagueId: number; - includeLicenses?: boolean; - }) { - return this.client.get("/data/league/get", { - params: { league_id: leagueId, include_licenses: includeLicenses }, - }); - } - - getPointsSystems({ - leagueId, - seasonId, - }: { - leagueId: number; - seasonId?: number; - }) { - return this.client.get( - "/data/league/get_points_systems", - { - params: { league_id: leagueId, season_id: seasonId }, - } - ); - } - - membership({ - customerId, - includeLeague, - }: { customerId?: number; includeLeague?: boolean } = {}) { - return this.client.get("/data/league/membership", { - params: { cust_id: customerId, include_league: includeLeague }, - }); - } - - roster({ - leagueId, - includeLicenses, - }: { - leagueId: number; - includeLicenses?: boolean; - }) { - return this.client.get("/data/league/roster", { - params: { league_id: leagueId, include_licenses: includeLicenses }, - }); - } - - seasons({ leagueId, retired }: { leagueId: number; retired?: boolean }) { - return this.client.get("/data/league/seasons", { - params: { league_id: leagueId, retired: retired }, - }); - } - - seasonStandings({ - leagueId, - seasonId, - carClassId, - carId, - }: { - leagueId: number; - seasonId: number; - carClassId?: number; - carId?: number; - }) { - return this.client.get( - "/data/league/season_standings", - { - params: { - league_id: leagueId, - season_id: seasonId, - car_class_id: carClassId, - car_id: carId, - }, - } - ); - } - - seasonSessions({ - leagueId, - seasonId, - resultsOnly, - }: { - leagueId: number; - seasonId: number; - resultsOnly?: boolean; - }) { - return this.client.get("/data/league/season_sessions", { - params: { - league_id: leagueId, - season_id: seasonId, - results_only: resultsOnly, - }, - }); - } -} - -export default LeagueAPI; diff --git a/packages/api/src/api/data/lookup/index.ts b/packages/api/src/api/data/lookup/index.ts deleted file mode 100644 index a2a7f8c..0000000 --- a/packages/api/src/api/data/lookup/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NetworkClientProvider, IRacingAPIResponse } from "../../types"; - -export class LookupAPI extends NetworkClientProvider { - countries() { - return this.client.get("/data/lookup/countries"); - } - - drivers({ searchTerm, leagueId }: { searchTerm: string; leagueId?: number }) { - return this.client.get("/data/lookup/drivers", { - params: { search_term: searchTerm, league_id: leagueId }, - }); - } - - flairs() { - return this.client.get("/data/lookup/flairs"); - } - - get(params: Record) { - return this.client.get("/data/lookup/get", { params }); - } - - licenses() { - return this.client.get("/data/lookup/licenses"); - } -} - -export default LookupAPI; diff --git a/packages/api/src/api/data/member/index.ts b/packages/api/src/api/data/member/index.ts deleted file mode 100644 index cf9d9c1..0000000 --- a/packages/api/src/api/data/member/index.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { - CategoryIdValue, - ChartTypeValue, - IRacingAPIResponse, - NetworkClientProvider, -} from "../../types"; - -export class MemberAPI extends NetworkClientProvider { - awards({ customerId }: { customerId?: number } = {}) { - return this.client.get("/data/member/awards", { - params: { cust_id: customerId }, - }); - } - - awardInstances({ - customerId, - awardId, - }: { - customerId?: number; - awardId: number; - }) { - return this.client.get("/data/member/award_instances", { - params: { cust_id: customerId, award_id: awardId }, - }); - } - - chartData({ - customerId, - categoryId, - chartType, - }: { - customerId?: number; - categoryId: CategoryIdValue; - chartType: ChartTypeValue; - }) { - return this.client.get("/data/member/chart_data", { - params: { - cust_id: customerId, - category_id: categoryId, - chart_type: chartType, - }, - }); - } - - get({ - customerIds, - includeLicenses, - }: { - customerIds: number[]; - includeLicenses?: boolean; - }) { - return this.client.get("/data/member/get", { - params: { cust_ids: customerIds, include_licenses: includeLicenses }, - }); - } - - info() { - return this.client.get("/data/member/info"); - } - - participationCredits() { - return this.client.get( - "/data/member/participation_credits" - ); - } - - profile({ customerId }: { customerId?: number } = {}) { - return this.client.get("/data/member/profile", { - params: { cust_id: customerId }, - }); - } -} - -export default MemberAPI; diff --git a/packages/api/src/api/data/results/index.ts b/packages/api/src/api/data/results/index.ts deleted file mode 100644 index 13517ce..0000000 --- a/packages/api/src/api/data/results/index.ts +++ /dev/null @@ -1,190 +0,0 @@ -import { - CategoryIdValue, - EventTypeValue, - IRacingAPIResponse, - NetworkClientProvider, -} from "../../types"; - -export class ResultsAPI extends NetworkClientProvider { - get({ - subsessionId, - includeLicenses, - }: { - subsessionId: number; - includeLicenses?: boolean; - }) { - return this.client.get("/data/results/get", { - params: { - subsession_id: subsessionId, - include_licenses: includeLicenses, - }, - }); - } - - eventLog({ - subsessionId, - simsessionNumber, - }: { - subsessionId: number; - simsessionNumber: number; - }) { - return this.client.get("/data/results/event_log", { - params: { - subsession_id: subsessionId, - simsession_number: simsessionNumber, - }, - }); - } - - lapChartData({ - subsessionId, - simsessionNumber, - }: { - subsessionId: number; - simsessionNumber: number; - }) { - return this.client.get("/data/results/lap_chart_data", { - params: { - subsession_id: subsessionId, - simsession_number: simsessionNumber, - }, - }); - } - - lapData({ - subsessionId, - simsessionNumber, - customerId, - teamId, - }: { - subsessionId: number; - simsessionNumber: number; - customerId?: number; - teamId?: number; - }) { - return this.client.get("/data/results/lap_data", { - params: { - subsession_id: subsessionId, - simsession_number: simsessionNumber, - cust_id: customerId, - team_id: teamId, - }, - }); - } - - searchHosted({ - startRangeBegin, - startRangeEnd, - finishRangeBegin, - finishRangeEnd, - customerId, - teamId, - hostCustomerId, - sessionName, - leagueId, - leagueSeasonId, - carId, - trackId, - categoryIds, - }: { - startRangeBegin?: Date; - startRangeEnd?: Date; - finishRangeBegin?: Date; - finishRangeEnd?: Date; - customerId?: number; - teamId?: number; - hostCustomerId?: number; - sessionName?: string; - leagueId?: number; - leagueSeasonId?: number; - carId?: number; - trackId?: number; - categoryIds?: CategoryIdValue[]; - } = {}) { - return this.client.get("/data/results/search_hosted", { - params: { - start_range_begin: startRangeBegin?.toUTCString(), - start_range_end: startRangeEnd?.toUTCString(), - finish_range_begin: finishRangeBegin?.toUTCString(), - finish_range_end: finishRangeEnd?.toUTCString(), - cust_id: customerId, - team_id: teamId, - host_cust_id: hostCustomerId, - session_name: sessionName, - league_id: leagueId, - league_season_id: leagueSeasonId, - car_id: carId, - track_id: trackId, - category_ids: categoryIds, - }, - }); - } - - searchSeries({ - seasonYear, - seasonQuarter, - startRangeBegin, - startRangeEnd, - finishRangeBegin, - finishRangeEnd, - customerId, - teamId, - seriesId, - raceWeekNumber, - officialOnly, - eventTypes, - categoryIds, - }: { - seasonYear?: number; - seasonQuarter?: number; - startRangeBegin?: Date; - startRangeEnd?: Date; - finishRangeBegin?: Date; - finishRangeEnd?: Date; - customerId?: number; - teamId?: number; - seriesId?: number; - raceWeekNumber?: number; - officialOnly?: boolean; - eventTypes?: EventTypeValue[]; - categoryIds?: CategoryIdValue[]; - }) { - return this.client.get("/data/results/search_series", { - params: { - season_year: seasonYear, - season_quarter: seasonQuarter, - start_range_begin: startRangeBegin?.toUTCString(), - start_range_end: startRangeEnd?.toUTCString(), - finish_range_begin: finishRangeBegin?.toUTCString(), - finish_range_end: finishRangeEnd?.toUTCString(), - cust_id: customerId, - team_id: teamId, - series_id: seriesId, - race_week_num: raceWeekNumber, - official_only: officialOnly, - event_types: eventTypes, - category_ids: categoryIds, - }, - }); - } - - seasonResults({ - seasonId, - eventType, - raceWeekNumber, - }: { - seasonId: number; - eventType?: EventTypeValue; - raceWeekNumber: number; - }) { - return this.client.get("/data/results/season_results", { - params: { - season_id: seasonId, - event_type: eventType, - race_week_num: raceWeekNumber, - }, - }); - } -} - -export default ResultsAPI; diff --git a/packages/api/src/api/data/season/index.ts b/packages/api/src/api/data/season/index.ts deleted file mode 100644 index 7bc17d2..0000000 --- a/packages/api/src/api/data/season/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { - EventType, - IRacingAPIResponse, - NetworkClientProvider, -} from "../../types"; - -export class SeasonAPI extends NetworkClientProvider { - list({ - seasonYear, - seasonQuarter, - }: { - seasonYear: number; - seasonQuarter: number; - }) { - return this.client.get("/data/season/list", { - params: { season_year: seasonYear, season_quarter: seasonQuarter }, - }); - } - - raceGuide({ - from, - includeEndAfterFrom, - }: { - from?: Date; - includeEndAfterFrom?: boolean; - }) { - return this.client.get("/data/season/race_guide", { - params: { from, include_end_after_from: includeEndAfterFrom }, - }); - } - - spectatorSubsessionIds({ eventTypes }: { eventTypes?: EventType[] }) { - return this.client.get( - "/data/season/spectator_subsessionids", - { - params: { event_types: eventTypes }, - } - ); - } - - spectatorSubsessionIdsDetail({ - eventTypes, - seasonIds, - }: { - eventTypes?: EventType[]; - seasonIds?: number[]; - }) { - return this.client.get( - "/data/season/spectator_subsessionids_detail", - { - params: { event_types: eventTypes, season_ids: seasonIds }, - } - ); - } -} - -export default SeasonAPI; diff --git a/packages/api/src/api/data/series/index.ts b/packages/api/src/api/data/series/index.ts deleted file mode 100644 index bc62ca5..0000000 --- a/packages/api/src/api/data/series/index.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { IRacingAPIResponse, NetworkClientProvider } from "../../types"; - -export class SeriesAPI extends NetworkClientProvider { - /** - * Note: image paths are relative to https://images-static.iracing.com/ - */ - assets() { - return this.client.get("/data/series/assets"); - } - - get() { - return this.client.get("/data/series/get"); - } - - pastSeasons({ seriesId }: { seriesId: number }) { - return this.client.get("/data/series/past_seasons", { - params: { series_id: seriesId }, - }); - } - - seasons({ - includeSeries, - seasonYear, - seasonQuarter, - }: { - includeSeries?: boolean; - seasonYear?: number; - seasonQuarter?: number; - } = {}) { - return this.client.get("/data/series/seasons", { - params: { - include_series: includeSeries, - season_year: seasonYear, - season_quarter: seasonQuarter, - }, - }); - } - - seasonList({ - includeSeries, - seasonYear, - seasonQuarter, - }: { - includeSeries?: boolean; - seasonYear?: number; - seasonQuarter?: number; - } = {}) { - return this.client.get("/data/series/season_list", { - params: { - include_series: includeSeries, - season_year: seasonYear, - season_quarter: seasonQuarter, - }, - }); - } - - seasonSchedule({ seasonId }: { seasonId: number }) { - return this.client.get("/data/series/season_schedule", { - params: { season_id: seasonId }, - }); - } - - statsSeries() { - return this.client.get("/data/series/stats_series"); - } -} - -export default SeriesAPI; diff --git a/packages/api/src/api/data/stats/index.ts b/packages/api/src/api/data/stats/index.ts deleted file mode 100644 index 4dc0d3d..0000000 --- a/packages/api/src/api/data/stats/index.ts +++ /dev/null @@ -1,251 +0,0 @@ -import { - Division, - IRacingAPIResponse, - NetworkClientProvider, -} from "../../types"; - -export class StatsAPI extends NetworkClientProvider { - memberBests({ - customerId, - carId, - }: { customerId?: number; carId?: number } = {}) { - return this.client.get("/data/stats/member_bests", { - params: { - cust_id: customerId, - car_id: carId, - }, - }); - } - - memberCareer({ customerId }: { customerId?: number } = {}) { - return this.client.get("/data/stats/member_career", { - params: { - cust_id: customerId, - }, - }); - } - - memberDivision({ - seasonId, - eventType, - }: { - seasonId: number; - eventType: 4 | 5; - }) { - return this.client.get("/data/stats/member_division", { - params: { - season_id: seasonId, - event_type: eventType, - }, - }); - } - - memberRecap({ - customerId, - year, - season, - }: { - customerId?: number; - year?: number; - season?: 1 | 2 | 3 | 4; - }) { - return this.client.get("/data/stats/member_recap", { - params: { - cust_id: customerId, - year, - season, - }, - }); - } - - memberRecentRaces({ customerId }: { customerId?: number } = {}) { - return this.client.get( - "/data/stats/member_recent_races", - { - params: { - cust_id: customerId, - }, - } - ); - } - - memberSummary({ customerId }: { customerId?: number } = {}) { - return this.client.get("/data/stats/member_summary", { - params: { - cust_id: customerId, - }, - }); - } - - memberYearly({ customerId }: { customerId?: number } = {}) { - return this.client.get("/data/stats/member_yearly", { - params: { - cust_id: customerId, - }, - }); - } - - seasonDriverStandings({ - seasonId, - carClassId, - raceWeekNumber, - division, - }: { - seasonId: number; - carClassId: number; - raceWeekNumber?: number; - division?: Division; - }) { - return this.client.get( - "/data/stats/season_driver_standings", - { - params: { - season_id: seasonId, - car_class_id: carClassId, - division, - race_week_num: raceWeekNumber, - }, - } - ); - } - - seasonSupersessionStandings({ - seasonId, - carClassId, - raceWeekNumber, - division, - }: { - seasonId: number; - carClassId: number; - raceWeekNumber?: number; - division?: Division; - }) { - return this.client.get( - "/data/stats/season_supersession_standings", - { - params: { - season_id: seasonId, - car_class_id: carClassId, - division, - race_week_num: raceWeekNumber, - }, - } - ); - } - - seasonTeamStandings({ - seasonId, - carClassId, - raceWeekNumber, - }: { - seasonId: number; - carClassId: number; - raceWeekNumber?: number; - }) { - return this.client.get( - "/data/stats/season_team_standings", - { - params: { - season_id: seasonId, - car_class_id: carClassId, - race_week_num: raceWeekNumber, - }, - } - ); - } - - seasonTimeTrialStandings({ - seasonId, - carClassId, - raceWeekNumber, - division, - }: { - seasonId: number; - carClassId: number; - raceWeekNumber?: number; - division?: Division; - }) { - return this.client.get( - "/data/stats/season_time_trial_standings", - { - params: { - season_id: seasonId, - car_class_id: carClassId, - division, - race_week_num: raceWeekNumber, - }, - } - ); - } - - seasonTimeTrialResults({ - seasonId, - carClassId, - raceWeekNumber, - division, - }: { - seasonId: number; - carClassId: number; - raceWeekNumber: number; - division?: Division; - }) { - return this.client.get( - "/data/stats/season_time_trial_results", - { - params: { - season_id: seasonId, - car_class_id: carClassId, - race_week_num: raceWeekNumber, - division, - }, - } - ); - } - - seasonQualifyResults({ - seasonId, - carClassId, - raceWeekNumber, - division, - }: { - seasonId: number; - carClassId: number; - raceWeekNumber: number; - division?: Division; - }) { - return this.client.get( - "/data/stats/season_qualify_results", - { - params: { - season_id: seasonId, - car_class_id: carClassId, - race_week_num: raceWeekNumber, - division, - }, - } - ); - } - - worldRecords({ - carId, - trackId, - seasonYear, - seasonQuarter, - }: { - carId: number; - trackId: number; - seasonYear?: number; - seasonQuarter?: number; - }) { - return this.client.get("/data/stats/world_records", { - params: { - carId, - trackId, - seasonYear, - seasonQuarter, - }, - }); - } -} - -export default StatsAPI; diff --git a/packages/api/src/api/data/team/index.ts b/packages/api/src/api/data/team/index.ts deleted file mode 100644 index f5a2219..0000000 --- a/packages/api/src/api/data/team/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IRacingAPIResponse, NetworkClientProvider } from "../../types"; - -export class TeamAPI extends NetworkClientProvider { - get({ - teamId, - includeLicenses, - }: { - teamId: number; - includeLicenses?: boolean; - }) { - return this.client.get(`/data/team/get`, { - params: { team_id: teamId, include_licenses: includeLicenses }, - }); - } - - membership() { - return this.client.get("/data/team/membership"); - } -} - -export default TeamAPI; diff --git a/packages/api/src/api/data/time-attack/index.ts b/packages/api/src/api/data/time-attack/index.ts deleted file mode 100644 index 80f3d9a..0000000 --- a/packages/api/src/api/data/time-attack/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IRacingAPIResponse, NetworkClientProvider } from "../../types"; - -export class TimeAttackAPI extends NetworkClientProvider { - memberSeasonResults({ seasonId }: { seasonId: number }) { - return this.client.get( - `/data/time_attack/member_season_results`, - { - params: { ta_comp_season_id: seasonId }, - } - ); - } -} - -export default TimeAttackAPI; diff --git a/packages/api/src/api/data/track/index.ts b/packages/api/src/api/data/track/index.ts deleted file mode 100644 index f27daec..0000000 --- a/packages/api/src/api/data/track/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IRacingAPIResponse, NetworkClientProvider } from "../../types"; - -export class TrackAPI extends NetworkClientProvider { - /** - * Get track assets - * Image paths are relative to https://images-static.iracing.com/ - */ - assets() { - return this.client.get("/data/track/assets"); - } - - get() { - return this.client.get("/data/track/get"); - } -} - -export default TrackAPI; diff --git a/packages/api/src/api/index.ts b/packages/api/src/api/index.ts deleted file mode 100644 index de95683..0000000 --- a/packages/api/src/api/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { AxiosInstance } from "axios"; -import { AuthAPI } from "./auth"; -import { DataAPI } from "./data"; -import { NetworkClientProvider } from "./types"; - -export * from "./types"; - -export class IRacingAPI extends NetworkClientProvider { - private _auth: AuthAPI; - get auth() { - return this._auth; - } - - private _data: DataAPI; - get data() { - return this._data; - } - - /** - * Initializes an IRacingAPI instance, using the provided client. - * @param client The Axios client to use for requests - */ - constructor(client: AxiosInstance) { - super(client); - this._auth = new AuthAPI(client); - this._data = new DataAPI(client); - } -} - -export default IRacingAPI; diff --git a/packages/api/src/api/types.ts b/packages/api/src/api/types.ts deleted file mode 100644 index 3f67bd7..0000000 --- a/packages/api/src/api/types.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { AxiosInstance } from "axios"; - -export class NetworkClientProvider { - constructor(private _client: AxiosInstance) {} - - get client() { - return this._client; - } -} - -export type IRacingAPIResponse = { - // A link to the cached data - link: string; - // An ISO 8601 date string - expires: string; -}; - -// Divisions are 0-based: 0 is Division 1, 10 is Rookie. -// See /data/constants/divisons for more information. -export type Division = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; -export const isDivision = (value: unknown): value is Division => - typeof value === "number" && value >= 0 && value <= 10; -export const assertDivision = (value: unknown): asserts value is Division => { - if (!isDivision(value)) { - throw new Error(`Invalid division: ${value}`); - } -}; - -export enum CategoryId { - Oval = 1, - Road, - DirtOval, - DirtRoad, -} - -export type CategoryIdValue = `${CategoryId}`; -export type CategoryIdKey = keyof typeof CategoryId; -export const CATEGORY_ID_LABELS = Object.keys(CategoryId); -export const isCategoryId = (value: unknown): value is CategoryIdValue => { - return typeof value === "number" && value >= 1 && value <= 4; -}; -export const assertCategoryId = ( - value: unknown -): asserts value is CategoryIdValue => { - if (!isCategoryId(value)) { - throw new Error(`Invalid category ID: ${value}`); - } -}; - -export enum ChartType { - iRating = 1, - TTRating, - LicenseRating, -} - -export type ChartTypeValue = `${ChartType}`; -export type ChartTypeKey = keyof typeof ChartType; -export const CHART_TYPE_LABELS = Object.keys(ChartType); -export const isChartType = (value: unknown): value is ChartTypeValue => { - return typeof value === "number" && value >= 1 && value <= 3; -}; -export const assertChartType = ( - value: unknown -): asserts value is ChartTypeValue => { - if (!isChartType(value)) { - throw new Error(`Invalid chart type: ${value}`); - } -}; - -export enum EventType { - Practice = 2, - Qualify, - TimeTrial, - Race, -} - -export type EventTypeValue = `${EventType}`; -export type EventTypeKey = keyof typeof EventType; -export const EVENT_TYPE_LABELS = Object.keys(EventType); -export const isEventType = (value: unknown): value is EventTypeValue => { - return typeof value === "number" && value >= 2 && value <= 5; -}; -export const assertEventType = ( - value: unknown -): asserts value is EventTypeValue => { - if (!isEventType(value)) { - throw new Error(`Invalid event type: ${value}`); - } -}; - -export enum Category { - Road = "road", - Oval = "oval", - DirtRoad = "dirt_road", - DirtOval = "dirt_oval", - SportsCar = "sports_car", - FormulaCar = "formula_car", -} - -export type CategoryValue = `${Category}`; -export type CategoryKey = keyof typeof Category; -export const CATEGORY_LABELS: string[] = Object.keys(Category); -export const CATEGORY_VALUES: string[] = Object.values(Category); - -export const isCategory = (value: string): value is CategoryValue => - CATEGORY_VALUES.includes(value as CategoryValue); - -export const assertCategory = ( - value: string -): asserts value is CategoryValue => { - if (!isCategory(value)) { - throw new Error(`Invalid category: ${value}`); - } -}; diff --git a/packages/api/src/client.ts b/packages/api/src/client.ts deleted file mode 100644 index 40a0719..0000000 --- a/packages/api/src/client.ts +++ /dev/null @@ -1,538 +0,0 @@ -import axios, { AxiosInstance } from "axios"; -import { wrapper } from "axios-cookiejar-support"; -import { CookieJar } from "tough-cookie"; -import { IRacingAPI, NetworkClientProvider } from "./api"; -import { IRacingAuthenticationError } from "./types"; -import { allCookiesValid, fetchValidLinkData } from "./util"; - -const DEFAULT_IRACING_DATA_API_URL = "https://members-ng.iracing.com/"; - -/** - * A wrapper class for the IRacingAPI that provides convenience methods for - * interacting with the API. - */ -export class IRacingAPIClient extends NetworkClientProvider { - private _api: IRacingAPI; - get api() { - return this._api; - } - - constructor(client: AxiosInstance) { - super(client); - this._api = new IRacingAPI(client); - } - - // /auth - - /** - * Authenticate with the iRacing API. - * !!!: This must be called before making requests to the `/data` endpoints. - * @param input: An object containing the username and password - * @returns If successful, the response data from the API - * @throws IRacingAuthenticationError if the authentication fails - */ - async authenticate(input: Parameters[0]) { - const response = await this.api.auth.auth(input); - if (response.status === 200) { - return response.data; - } - - throw new IRacingAuthenticationError(); - } - - // /data - - async doc() { - const response = await this.api.data.doc(); - return response.data; - } - - // /data/car - - async carAssets() { - const response = await this.api.data.car.assets(); - return fetchValidLinkData(response.data); - } - - async carGet() { - const response = await this.api.data.car.get(); - return fetchValidLinkData(response.data); - } - - // /data/carclass - - async carClassGet() { - const response = await this.api.data.carClass.get(); - return fetchValidLinkData(response.data); - } - - // /data/constants - - async constantsCategories() { - const response = await this.api.data.constants.categories(); - return fetchValidLinkData(response.data); - } - - async constantsDivisions() { - const response = await this.api.data.constants.divisions(); - return fetchValidLinkData(response.data); - } - - async constantsEventTypes() { - const response = await this.api.data.constants.eventTypes(); - return fetchValidLinkData(response.data); - } - - // /data/driver_stats_by_category - - async driverStatsByCategory( - input: Parameters[0] - ) { - const response = await this.api.data.driverStats.category(input); - return fetchValidLinkData(response.data); - } - - // /data/hosted - - async hostedCombinedSessions( - input: Parameters[0] - ) { - const response = await this.api.data.hosted.combinedSessions(input); - return fetchValidLinkData(response.data); - } - - async hostedSessions() { - const response = await this.api.data.hosted.sessions(); - return fetchValidLinkData(response.data); - } - - // /data/league - - async leagueDirectory( - input: Parameters[0] = {} - ) { - const response = await this.api.data.league.directory(input); - return fetchValidLinkData(response.data); - } - - async leagueCustomerLeagueSessions( - input: Parameters< - IRacingAPI["data"]["league"]["customerLeagueSessions"] - >[0] = {} - ) { - const response = await this.api.data.league.customerLeagueSessions(input); - return fetchValidLinkData(response.data); - } - - async leagueGet(input: Parameters[0]) { - const response = await this.api.data.league.get(input); - return fetchValidLinkData(response.data); - } - - async leagueGetPointsSystems( - input: Parameters[0] - ) { - const response = await this.api.data.league.getPointsSystems(input); - return fetchValidLinkData(response.data); - } - - async leagueMembership( - input: Parameters[0] - ) { - const response = await this.api.data.league.membership(input); - return fetchValidLinkData(response.data); - } - - async leagueRoster( - input: Parameters[0] - ) { - const response = await this.api.data.league.roster(input); - return fetchValidLinkData(response.data); - } - - async leagueSeasons( - input: Parameters[0] - ) { - const response = await this.api.data.league.seasons(input); - return fetchValidLinkData(response.data); - } - - async leagueSeasonStandings( - input: Parameters[0] - ) { - const response = await this.api.data.league.seasonStandings(input); - return fetchValidLinkData(response.data); - } - - async leagueSeasonSessions( - input: Parameters[0] - ) { - const response = await this.api.data.league.seasonSessions(input); - return fetchValidLinkData(response.data); - } - - // /data/lookup - - async lookupCountries() { - const response = await this.api.data.lookup.countries(); - return fetchValidLinkData(response.data); - } - - async lookupDrivers( - input: Parameters[0] - ) { - const response = await this.api.data.lookup.drivers(input); - return fetchValidLinkData(response.data); - } - - async lookupGet(input: Parameters[0]) { - const response = await this.api.data.lookup.get(input); - return fetchValidLinkData(response.data); - } - - async lookupLicenses() { - const response = await this.api.data.lookup.licenses(); - return fetchValidLinkData(response.data); - } - - // /data/member - - async memberAwards( - input: Parameters[0] - ) { - const response = await this.api.data.member.awards(input); - return fetchValidLinkData(response.data); - } - - async memberAwardInstances( - input: Parameters[0] - ) { - const response = await this.api.data.member.awardInstances(input); - return fetchValidLinkData(response.data); - } - - async memberChartData( - input: Parameters[0] - ) { - const response = await this.api.data.member.chartData(input); - return fetchValidLinkData(response.data); - } - - async memberGet(input: Parameters[0]) { - const response = await this.api.data.member.get(input); - return fetchValidLinkData(response.data); - } - - async memberInfo() { - const response = await this.api.data.member.info(); - return fetchValidLinkData(response.data); - } - - async memberParticipationCredits() { - const response = await this.api.data.member.participationCredits(); - return fetchValidLinkData(response.data); - } - - async memberProfile( - input: Parameters[0] - ) { - const response = await this.api.data.member.profile(input); - return fetchValidLinkData(response.data); - } - - // /data/results - - async resultsGet(input: Parameters[0]) { - const response = await this.api.data.results.get(input); - return fetchValidLinkData(response.data); - } - - async resultsEventLog( - input: Parameters[0] - ) { - const response = await this.api.data.results.eventLog(input); - return fetchValidLinkData(response.data); - } - - async resultsLapChartData( - input: Parameters[0] - ) { - const response = await this.api.data.results.lapChartData(input); - return fetchValidLinkData(response.data); - } - - async resultsLapData( - input: Parameters[0] - ) { - const response = await this.api.data.results.lapData(input); - return fetchValidLinkData(response.data); - } - - async resultsSearchHosted( - input: Parameters[0] = {} - ) { - const response = await this.api.data.results.searchHosted(input); - return fetchValidLinkData(response.data); - } - - async resultsSearchSeries( - input: Parameters[0] - ) { - const response = await this.api.data.results.searchSeries(input); - return fetchValidLinkData(response.data); - } - - async resultsSeasonResults( - input: Parameters[0] - ) { - const response = await this.api.data.results.seasonResults(input); - return fetchValidLinkData(response.data); - } - - // /data/season - - async seasonList(input: Parameters[0]) { - const response = await this.api.data.season.list(input); - return fetchValidLinkData(response.data); - } - - async seasonRaceGuide( - input: Parameters[0] - ) { - const response = await this.api.data.season.raceGuide(input); - return fetchValidLinkData(response.data); - } - - async seasonSpectatorSubsessionIds( - input: Parameters[0] - ) { - const response = await this.api.data.season.spectatorSubsessionIds(input); - return fetchValidLinkData(response.data); - } - - async seasonSpectatorSubsessionIdsDetail( - input: Parameters< - IRacingAPI["data"]["season"]["spectatorSubsessionIdsDetail"] - >[0] - ) { - const response = - await this.api.data.season.spectatorSubsessionIdsDetail(input); - return fetchValidLinkData(response.data); - } - - // /data/series - - async seriesAssets() { - const response = await this.api.data.series.assets(); - return fetchValidLinkData(response.data); - } - - async seriesGet() { - const response = await this.api.data.series.get(); - return fetchValidLinkData(response.data); - } - - async seriesPastSeasons( - input: Parameters[0] - ) { - const response = await this.api.data.series.pastSeasons(input); - return fetchValidLinkData(response.data); - } - - async seriesSeasons( - input: Parameters[0] - ) { - const response = await this.api.data.series.seasons(input); - return fetchValidLinkData(response.data); - } - - async seriesStatsSeries() { - const response = await this.api.data.series.statsSeries(); - return fetchValidLinkData(response.data); - } - - // /data/stats - - async statsMemberBests( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberBests(input); - return fetchValidLinkData(response.data); - } - - async statsMemberCareer( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberCareer(input); - return fetchValidLinkData(response.data); - } - - async statsMemberDivision( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberDivision(input); - return fetchValidLinkData(response.data); - } - - async statsMemberRecap( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberRecap(input); - return fetchValidLinkData(response.data); - } - - async statsMemberRecentRaces( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberRecentRaces(input); - return fetchValidLinkData(response.data); - } - - async statsMemberSummary( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberSummary(input); - return fetchValidLinkData(response.data); - } - - async statsMemberYearly( - input: Parameters[0] - ) { - const response = await this.api.data.stats.memberYearly(input); - return fetchValidLinkData(response.data); - } - - async statsSeasonDriverStandings( - input: Parameters[0] - ) { - const response = await this.api.data.stats.seasonDriverStandings(input); - return fetchValidLinkData(response.data); - } - - async statsSeasonSupersessionStandings( - input: Parameters< - IRacingAPI["data"]["stats"]["seasonSupersessionStandings"] - >[0] - ) { - const response = - await this.api.data.stats.seasonSupersessionStandings(input); - return fetchValidLinkData(response.data); - } - - async statsSeasonTeamStandings( - input: Parameters[0] - ) { - const response = await this.api.data.stats.seasonTeamStandings(input); - return fetchValidLinkData(response.data); - } - - async statsSeasonTimeTrialStandings( - input: Parameters< - IRacingAPI["data"]["stats"]["seasonTimeTrialStandings"] - >[0] - ) { - const response = await this.api.data.stats.seasonTimeTrialStandings(input); - return fetchValidLinkData(response.data); - } - - async statsSeasonTimeTrialResults( - input: Parameters[0] - ) { - const response = await this.api.data.stats.seasonTimeTrialResults(input); - return fetchValidLinkData(response.data); - } - - async statsSeasonQualifyResults( - input: Parameters[0] - ) { - const response = await this.api.data.stats.seasonQualifyResults(input); - return fetchValidLinkData(response.data); - } - - async statsWorldRecords( - input: Parameters[0] - ) { - const response = await this.api.data.stats.worldRecords(input); - return fetchValidLinkData(response.data); - } - - // /data/team - - async teamGet(input: Parameters[0]) { - const response = await this.api.data.team.get(input); - return fetchValidLinkData(response.data); - } - - async teamMembership() { - const response = await this.api.data.team.membership(); - return fetchValidLinkData(response.data); - } - - // /data/time_attack - - async timeAttackMemberSeasonResults( - input: Parameters< - IRacingAPI["data"]["timeAttack"]["memberSeasonResults"] - >[0] - ) { - const response = await this.api.data.timeAttack.memberSeasonResults(input); - return fetchValidLinkData(response.data); - } - - // /data/track - - async trackAssets() { - const response = await this.api.data.track.assets(); - return fetchValidLinkData(response.data); - } - - async trackGet() { - const response = await this.api.data.track.get(); - return fetchValidLinkData(response.data); - } -} - -export class IRacingAPISessionClient extends IRacingAPIClient { - get cookieJar() { - return this._cookieJar; - } - - constructor(private _cookieJar: CookieJar = new CookieJar()) { - const client = wrapper( - axios.create({ - baseURL: DEFAULT_IRACING_DATA_API_URL, - withCredentials: true, - jar: _cookieJar, - headers: { - "Content-Type": "application/json", - }, - }) - ); - - super(client); - } - - /** - * Checks if we have a valid session and returns the email of the currently logged in user. - * @returns the email of the currently logged in user or null - */ - whoami(): string | null { - const cookies = this.cookieJar.getCookiesSync(DEFAULT_IRACING_DATA_API_URL); - if (allCookiesValid(cookies)) { - const authTokenCookie = cookies.find( - (cookie) => cookie.key === "authtoken_members" - ); - - if (authTokenCookie) { - const { authtoken: { email = null } = {} } = - JSON.parse(decodeURIComponent(authTokenCookie.value)) || {}; - - return email; - } - } - - return null; - } -} - -export default IRacingAPIClient; diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts deleted file mode 100644 index c8c0ca9..0000000 --- a/packages/api/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./types"; -export * from "./client"; -export { hashPassword } from "./util"; -export { default } from "./client"; diff --git a/packages/api/src/types.ts b/packages/api/src/types.ts deleted file mode 100644 index 1943396..0000000 --- a/packages/api/src/types.ts +++ /dev/null @@ -1,25 +0,0 @@ -export * from "./api/types"; - -export class IRacingAuthenticationError extends Error { - constructor() { - super("Failed to authenticate with iRacing."); - } -} - -export class InvalidResponseData extends Error { - constructor() { - super("Invalid response data"); - } -} - -export class InvalidSessionError extends Error { - constructor() { - super("You are not authenticated. Please run `auth`."); - } -} - -export class CacheExpiredError extends Error { - constructor() { - super("Cached data has expired"); - } -} diff --git a/packages/api/src/util.ts b/packages/api/src/util.ts deleted file mode 100644 index fd0e7d8..0000000 --- a/packages/api/src/util.ts +++ /dev/null @@ -1,40 +0,0 @@ -import crypto from "node:crypto"; -import axios, { AxiosInstance } from "axios"; -import { Cookie } from "tough-cookie"; -import { IRacingAPIResponse } from "./api/types"; -import { CacheExpiredError, InvalidResponseData } from "./types"; - -/** - * Compute the Base64‑encoded SHA‑256 hash of (password + email.toLowerCase()). - */ -export async function hashPassword(email: string, password: string) { - return crypto - .createHash("sha256") - .update(password + email.toLowerCase()) - .digest("base64"); -} - -export const allCookiesValid = (cookies: Cookie[]) => - cookies.every((cookie) => cookie.TTL() > 0); - -export async function fetchValidLinkData( - response: IRacingAPIResponse, - client: AxiosInstance = axios -) { - if (!response || !response.link || !response.expires) { - throw new InvalidResponseData(); - } - - const expirationDate = new Date(response.expires); - const now = new Date(); - - if (expirationDate < now) { - throw new CacheExpiredError(); - } - - const data = await client.get(response.link, { - responseType: "json", - }); - - return data.data; -} diff --git a/packages/cli/.npmignore b/packages/cli/.npmignore deleted file mode 100644 index 979227b..0000000 --- a/packages/cli/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -src -tsconfig.build.json -tsconfig.build.tsbuildinfo -tsconfig.json diff --git a/packages/cli/README.md b/packages/cli/README.md deleted file mode 100644 index 903b332..0000000 --- a/packages/cli/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# @iracing-data/cli - -A CLI impelementation for the iRacing `/data` API. - -```sh -Usage: index [options] [command] - -CLI tool for interacting with the iRacing API - -Options: - -V, --version output the version number - -c, --credentials Path to credentials file - -h, --help display help for command - -Commands: - whoami Prints the current session's username - auth [options] Stores credentials for the iRacing API - logout Clears stored credentials - docs [options] Downloads the latest API documentation from `/data/doc` - car-assets Fetch car assets - car Fetch car - car-class [options] Fetch car class - categories [options] Fetch categories - divisions [options] Fetch divisions - event-types [options] Fetch event types - member-profile [options] Fetch member profile - driver-stats [options] Fetch driver stats for a specific category - hosted-combined [options] Fetch hosted combined sessions - hosted [options] Fetch hosted sessions - league [options] Fetch league - league-sessions [options] Fetch league sessions - league-directory [options] Fetch league directory - league-membership [options] Fetch league membership - league-roster [options] Fetch league roster - league-seasons [options] Fetch league seasons - league-season-standings [options] Fetch league season standings - lookup-countries [options] Fetch countries - lookup-drivers [options] Fetch drivers - member-awards [options] Fetch member awards - member-info [options] Fetch member info - race-results [options] Get results for a subsession. - lap-data [options] Fetch lap data - season-list [options] Fetch season list - race-guide [options] Fetch race guid - series [options] Fetch series - series-past-seasons Fetch series past seasons - member-career-stats [options] Fetch member career stats - season-driver-standings [options] Fetch season driver standings - track-assets Fetch track assets - track-info Fetch track info - help [command] display help for command -``` \ No newline at end of file diff --git a/packages/cli/bin/index.js b/packages/cli/bin/index.js deleted file mode 100755 index bec45f8..0000000 --- a/packages/cli/bin/index.js +++ /dev/null @@ -1,743 +0,0 @@ -#!/usr/bin/env node -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const path_1 = __importDefault(require("path")); -const extra_typings_1 = require("@commander-js/extra-typings"); -const api_1 = require("@iracing-data/api"); -const sync_car_assets_1 = require("@iracing-data/sync-car-assets"); -const sync_track_assets_1 = require("@iracing-data/sync-track-assets"); -const inquirer_1 = __importDefault(require("inquirer")); -const lodash_1 = require("lodash"); -const tough_cookie_1 = require("tough-cookie"); -const storage_1 = require("./storage"); -const util_1 = require("./util"); -const createCookieStore = (credentials) => { - return new storage_1.JSONCookieStore(credentials); -}; -const createCookieJar = (credentials) => { - return new tough_cookie_1.CookieJar(createCookieStore(credentials)); -}; -const createAPI = (credentials) => { - return new api_1.IRacingAPISessionClient(createCookieJar(credentials)); -}; -const categoryArg = new extra_typings_1.Argument("", "Category to fetch driver stats for") - .choices(api_1.CATEGORY_VALUES) - .argRequired(); -/** - * Main program instance that provides a common interface for the CLI tool. - */ -const program = new extra_typings_1.Command("iracing-data") - .description("CLI tool for interacting with the iRacing API") - .version("0.0.0") - // ???: Should this remain a global option or be attached to relevant commands via Command subclass? - .option("--credentials ", "Path to credentials file", path_1.default.join(__dirname, "cookies.json")); -/** - * whoami command - */ -program - .command("whoami") - .description("Prints the current session information.") - .action((_, command) => { - const { credentials } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(api.whoami() || "No session found."); -}); -/** - * logout command - */ -program - .command("logout") - .description("Logs out of the current session.") - .action((_, command) => { - const { credentials } = command.optsWithGlobals(); - const cookieJar = createCookieJar(credentials); - cookieJar.removeAllCookies(lodash_1.noop); - console.log("Logged out."); -}); -/** - * auth command - */ -program - .command("auth") - .description("Stores credentials for the iRacing API") - .option("-u, --username ", "iRacing username") - .action(async (_, command) => { - const { credentials, username: usernameOption } = command.optsWithGlobals(); - const { username = usernameOption, password } = await inquirer_1.default.prompt([ - { - type: "input", - name: "username", - message: "Enter your username:", - when: () => !usernameOption, - }, - { - type: "password", - name: "password", - message: "Enter your password:", - mask: "*", - }, - ]); - console.log(`Authenticating with ${username}...`); - const hashedPassword = await (0, api_1.hashPassword)(username, password); - const api = createAPI(credentials); - await api.authenticate({ username, password: hashedPassword }); - console.log("✅ Authentication successful"); -}); -/** - * award-instances command - */ -program - .command("award-instances") - .argument("[customerId]", "Customer ID", parseInt) - .argument("", "Award ID", parseInt) - .description("Fetch award instances") - .option("-o, --output ", "Output path") - .action(async (customerId, awardId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const awardInstances = await api.memberAwardInstances({ - customerId, - awardId, - }); - (0, util_1.handleOutput)(awardInstances, output); -}); -/** - * car-assets command - */ -program - .command("car-assets") - .description("Fetch car assets") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const carAssets = await api.carAssets(); - (0, util_1.handleOutput)(carAssets, output); -}); -/** - * car command - */ -program - .command("car") - .description("Fetch car") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const car = await api.carGet(); - (0, util_1.handleOutput)(car, output); -}); -/** - * car-class command - */ -program - .command("car-class") - .description("Fetch car class") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const carClass = await api.carClassGet(); - (0, util_1.handleOutput)(carClass, output); -}); -/** - * categories command - */ -program - .command("categories") - .description("Fetch categories") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const categories = await api.constantsCategories(); - (0, util_1.handleOutput)(categories, output); -}); -/** - * countries command - */ -program - .command("countries") - .description("Fetch countries") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const countries = await api.lookupCountries(); - (0, util_1.handleOutput)(countries, output); -}); -/** - * divisions command - */ -program - .command("divisions") - .description("Fetch divisions") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const divisions = await api.constantsDivisions(); - (0, util_1.handleOutput)(divisions, output); -}); -/** - * docs command - */ -program - .command("docs") - .description("Downloads the latest API documentation from `/data/doc`") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const docs = await api.doc(); - (0, util_1.handleOutput)(docs, output); -}); -program - .command("download-car-assets") - .description("Downloads the latest car assets.") - .requiredOption("-o, --out-dir ", "Output directory") - .option("-i, --write-full-info", "Write full car info", false) - .option("--skip-info", "Skip writing car info", false) - .option("-a, --write-full-assets", "Write full car assets", false) - .option("--skip-assets", "Skip writing car asset", false) - .option("-u, --username ", "iRacing username") - .action(async (_, command) => { - console.log("Downloading car assets..."); - const { credentials, outDir, writeFullAssets, writeFullInfo, skipInfo: skipCarInfo, skipAssets: skipCarAssets, username, } = command.optsWithGlobals(); - const api = createAPI(credentials); - await (0, sync_car_assets_1.syncCarAssets)({ - outputDir: outDir, - writeFullAssets, - writeFullInfo, - skipCarAssets, - skipCarInfo, - username, - }, api); - console.log("Done!"); -}); -program - .command("download-track-assets") - .description("Downloads the latest track SVGs.") - .requiredOption("-o, --out-dir ", "Output directory") - .option("-f, --force", "Force download of existing SVG layers", false) - .option("-i, --write-full-info", "Write full track info", false) - .option("--skip-info", "Skip writing track info", false) - .option("-a, --write-full-assets", "Write full track assets", false) - .option("--skip-assets", "Skip writing track asset", false) - .option("--include-svgs", "Include SVGs", false) - .action(async (_, command) => { - console.log("Downloading track assets..."); - const { credentials, outDir, writeFullAssets, writeFullInfo, skipAssets: skipTrackAssets, skipInfo: skipTrackInfo, includeSvgs, force, } = command.optsWithGlobals(); - const api = createAPI(credentials); - await (0, sync_track_assets_1.syncTrackAssets)({ - outputDir: outDir, - writeFullAssets, - writeFullInfo, - skipTrackAssets, - skipTrackInfo, - force, - includeSVGs: includeSvgs, - }, api); - console.log("Done!"); -}); -/** - * driver-stats - */ -program - .command("driver-stats") - .addArgument(categoryArg) - .description("Fetch driver stats") - .option("-o, --output ", "Output path") - .action(async (category, _, command) => { - (0, api_1.assertCategory)(category); - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const driverStats = await api.driverStatsByCategory({ category }); - (0, util_1.handleOutput)(driverStats, output); -}); -/** - * event-types command - */ -program - .command("event-types") - .description("Fetch event types") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const eventTypes = await api.constantsEventTypes(); - (0, util_1.handleOutput)(eventTypes, output); -}); -/** - * hosted command - */ -program - .command("hosted") - .description("Fetch hosted sessions") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const hostedSessions = await api.hostedSessions(); - (0, util_1.handleOutput)(hostedSessions, output); -}); -/** - * hosted-combined command - */ -program - .command("hosted-combined") - .description("Fetch hosted combined sessions") - .option("-p, --package-id ", "Package ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output, packageId } = command.optsWithGlobals(); - const api = createAPI(credentials); - const hostedCombinedSessions = await api.hostedCombinedSessions({ - packageId, - }); - (0, util_1.handleOutput)(hostedCombinedSessions, output); -}); -/** - * lap-data command - */ -program - .command("lap-data") - .argument("", "Subsession ID", parseInt) - .argument("", "Session number", parseInt) - .description("Fetch lap data") - .option("-c, --customer-id ", "Customer ID", parseInt) - .option("-t, --team-id ", "Team ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (subsessionId, sessionNumber, _, command) => { - const { credentials, customerId, teamId, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const lapData = await api.resultsLapData({ - subsessionId, - simsessionNumber: sessionNumber, - customerId, - teamId, - }); - (0, util_1.handleOutput)(lapData, output); -}); -/** - * league command - */ -program - .command("league") - .argument("", "League ID", parseInt) - .description("Fetch league") - .option("-l, --include-licenses", "Include licenses") - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, includeLicenses, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching league ${leagueId}...`); - const league = await api.leagueGet({ leagueId, includeLicenses }); - (0, util_1.handleOutput)(league, output); -}); -/** - * league-directory command - */ -program - .command("league-directory") - .description("Fetch league directory") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching league directory..."); - console.log("TODO: Support params"); - const leagueDirectory = await api.leagueDirectory(); - (0, util_1.handleOutput)(leagueDirectory, output); -}); -/** - * league-membership command - */ -program - .command("league-membership") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch league membership") - .option("-l, --include-league", "Include league") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, includeLeague, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching league membership for ${customerId}...`); - const leagueMembership = await api.leagueMembership({ - customerId, - includeLeague, - }); - (0, util_1.handleOutput)(leagueMembership, output); -}); -/** - * league-points-systems command - */ -program - .command("league-points-systems") - .argument("", "League ID", parseInt) - .description("Fetch league points systems") - .option("-s, --season-id ", "Season ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, output, seasonId } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching league points systems..."); - const leaguePointsSystems = await api.leagueGetPointsSystems({ - leagueId, - seasonId, - }); - (0, util_1.handleOutput)(leaguePointsSystems, output); -}); -/** - * league-roster command - */ -program - .command("league-roster") - .argument("", "League ID", parseInt) - .description("Fetch league roster") - .option("-l, --include-licenses", "Include licenses") - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, includeLicenses, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching league roster for ${leagueId}...`); - const leagueRoster = await api.leagueRoster({ - leagueId, - includeLicenses, - }); - (0, util_1.handleOutput)(leagueRoster, output); -}); -/** - * league-seasons command - */ -program - .command("league-seasons") - .argument("", "League ID", parseInt) - .description("Fetch league seasons") - .option("-r, --retired", "Retired") - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, retired, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching league seasons for ${leagueId}...`); - const leagueSeasons = await api.leagueSeasons({ leagueId, retired }); - (0, util_1.handleOutput)(leagueSeasons, output); -}); -/** - * league-season-sessions command - */ -program - .command("league-season-sessions") - .argument("", "League ID", parseInt) - .argument("", "Season ID", parseInt) - .description("Fetch league season sessions") - .option("-r, --results-only", "Results only") - .option("-o, --output ", "Output path") - .action(async (leagueId, seasonId, _, command) => { - const { credentials, output, resultsOnly } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching league season sessions for ${leagueId} ${seasonId}...`); - const leagueSeasonSessions = await api.leagueSeasonSessions({ - leagueId, - seasonId, - resultsOnly, - }); - (0, util_1.handleOutput)(leagueSeasonSessions, output); -}); -/** - * league-season-standings command - */ -program - .command("league-season-standings") - .argument("", "League ID", parseInt) - .argument("", "Season ID", parseInt) - .description("Fetch league season standings") - .option("-c, --car-class-id ", "Car class ID", parseInt) - .option("-C, --car-id ", "Car ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (leagueId, seasonId, _, command) => { - const { credentials, carClassId, carId, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching league season standings for ${leagueId} ${seasonId}...`); - const leagueSeasonStandings = await api.leagueSeasonStandings({ - leagueId, - seasonId, - carClassId, - carId, - }); - (0, util_1.handleOutput)(leagueSeasonStandings, output); -}); -/** - * league-sessions command - */ -program - .command("league-sessions") - .description("Fetch league sessions") - .option("-m, --mine", "Mine") - .option("-p, --package-id ", "Package ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching league sessions..."); - const leagueSessions = await api.leagueCustomerLeagueSessions(); - (0, util_1.handleOutput)(leagueSessions, output); -}); -/** - * licenses command - */ -program - .command("licenses") - .description("Fetch licenses") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const licenses = await api.lookupLicenses(); - (0, util_1.handleOutput)(licenses, output); -}); -/** - * member-awards command - */ -program - .command("member-awards") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch member awards") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member awards for ${customerId}...`); - const memberAwards = await api.memberAwards({ customerId }); - (0, util_1.handleOutput)(memberAwards, output); -}); -/** - * member-career-stats command - */ -program - .command("member-career-stats") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch member career stats") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member career stats for ${customerId}...`); - const memberCareerStats = await api.statsMemberCareer({ customerId }); - (0, util_1.handleOutput)(memberCareerStats, output); -}); -/** - * member-info command - */ -program - .command("member-info") - .description("Fetch member info") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member info...`); - const memberInfo = await api.memberInfo(); - (0, util_1.handleOutput)(memberInfo, output); -}); -/** - * member-participation command - */ -program - .command("member-participation") - .description("Fetch member info") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member participation...`); - const participation = await api.memberParticipationCredits(); - (0, util_1.handleOutput)(participation, output); -}); -/** - * member-profile command - */ -program - .command("member-profile") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch member profile") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member profile${customerId ? ` for ${customerId}` : ""}...`); - const memberProfile = await api.memberProfile({ customerId }); - (0, util_1.handleOutput)(memberProfile, output); -}); -/** - * race-guide command - */ -program - .command("race-guide") - .argument("[from]", "ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time.") - .description("Fetch race guide") - .option("-e, --end-after-from", "Include sessions which start before 'from' but end after.") - .option("-o, --output ", "Output path") - .action(async (from, _, command) => { - const { endAfterFrom } = command.optsWithGlobals(); - // const api = createAPI(credentials); - console.log(`Fetching race guide for ${from}. ${endAfterFrom ? "Including" : "Not including"} sessions which start before 'from' but end after.`); - console.error("!!!: Fix this"); - // const raceGuide = await api.getRaceGuide({ - // from: from ? Date.parse(from) : undefined, - // endAfterFrom, - // }); - // console.log(raceGuide); -}); -/** - * race-results command - */ -program - .command("race-results") - .argument("", "Subsession ID", parseInt) - .description("Fetch race results for a given session") - .option("-l, --include-licenses", "Include licenses") - .option("-o, --output ", "Output path") - .action(async (subsessionId, _, command) => { - const { credentials, includeLicenses, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching race results for session ${subsessionId}...`); - const raceResults = await api.resultsGet({ - subsessionId, - includeLicenses, - }); - (0, util_1.handleOutput)(raceResults, output); -}); -/** - * search-drivers command - */ -program - .command("search-drivers") - .argument("", "Search query") - .description("Fetch drivers") - .option("-l, --league-id ", "League ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (search, _, command) => { - const { credentials, output, leagueId } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Searching for drivers matching "${search}"...`); - const drivers = await api.lookupDrivers({ searchTerm: search, leagueId }); - (0, util_1.handleOutput)(drivers, output); -}); -/** - * search-hosted-results command - */ -program - .command("search-hosted-results") - .description("Fetch hosted results") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Searching for hosted results matching "undefined"...`); - console.log("TODO: Add support for params"); - const hostedResults = await api.resultsSearchHosted(); - (0, util_1.handleOutput)(hostedResults, output); -}); -/** - * season-driver-standings command - */ -program - .command("season-driver-standings") - .argument("", "Season ID", parseInt) - .argument("", "Car class ID", parseInt) - .description("Fetch season driver standings") - .option("-c, --club-id ", "Club ID", parseInt) - .option("-d, --division ", "Division", parseInt) - .option("-r, --race-week-number ", "Race week number", parseInt) - .option("-o, --output ", "Output path") - .action(async (seasonId, carClassId, _, command) => { - const { credentials, clubId, division, raceWeekNumber, output } = command.optsWithGlobals(); - (0, api_1.assertDivision)(division); - const api = createAPI(credentials); - console.log(`Fetching season driver standings for ${seasonId} ${carClassId}...`); - const seasonDriverStandings = await api.statsSeasonDriverStandings({ - seasonId, - carClassId, - division, - raceWeekNumber, - }); - (0, util_1.handleOutput)(seasonDriverStandings, output); -}); -/** - * season-list command - */ -program - .command("season-list") - .argument("", "Season year", parseInt) - .argument("", "Season quarter", parseInt) - .description("Fetch season list") - .option("-o, --output ", "Output path") - .action(async (seasonYear, seasonQuarter, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching season list..."); - const seasonList = await api.seasonList({ seasonYear, seasonQuarter }); - (0, util_1.handleOutput)(seasonList, output); -}); -/** - * series command - */ -program - .command("series") - .description("Fetch series") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching series..."); - const series = await api.seriesGet(); - (0, util_1.handleOutput)(series, output); -}); -/** - * series-past-seasons command - */ -program - .command("series-past-seasons") - .argument("", "Series ID", parseInt) - .description("Fetch series past seasons") - .option("-o, --output ", "Output path") - .action(async (seriesId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching past seasons for series ${seriesId}...`); - const seriesPastSeasons = await api.seriesPastSeasons({ seriesId }); - (0, util_1.handleOutput)(seriesPastSeasons, output); -}); -/** - * track-assets command - */ -program - .command("track-assets") - .description("Fetch track assets") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching track assets..."); - const trackAssets = await api.trackAssets(); - (0, util_1.handleOutput)(trackAssets, output); -}); -/** - * track-info command - */ -program - .command("track-info") - .description("Fetch track info") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching track info..."); - const trackInfo = await api.trackGet(); - (0, util_1.handleOutput)(trackInfo, output); -}); -program.parse(); diff --git a/packages/cli/bin/storage.js b/packages/cli/bin/storage.js deleted file mode 100644 index 84744a1..0000000 --- a/packages/cli/bin/storage.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JSONCookieStore = void 0; -const fs_1 = __importDefault(require("fs")); -const util_1 = __importDefault(require("util")); -const tough_cookie_1 = require("tough-cookie"); -/** - * Subclass of the `MemoryCookieStore` that persists cookies to a JSON file after all operations. - */ -class JSONCookieStore extends tough_cookie_1.MemoryCookieStore { - constructor(filePath) { - super(); - Object.defineProperty(this, "_filePath", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - this._filePath = filePath; - if (util_1.default.inspect.custom) { - this[util_1.default.inspect.custom] = this.inspect; - } - this.idx = this.loadFromFile(); - } - inspect() { - return `{ idx: ${util_1.default.inspect(this.idx, false, 2)} }`; - } - saveToFile() { - fs_1.default.writeFileSync(this.filePath, JSON.stringify(this.idx)); - } - loadFromFile() { - let cookieData = null; - let cookiesJSON = {}; - // If the file exists, load the raw data from the file path - if (fs_1.default.existsSync(this.filePath)) { - cookieData = fs_1.default.readFileSync(this.filePath, "utf8"); - } - if (cookieData) { - try { - cookiesJSON = JSON.parse(cookieData); - } - catch (error) { - console.error(error); - throw new Error(`Could not parse cookie file at ${this.filePath}.`); - } - } - for (const domainName in cookiesJSON) { - for (const pathName in cookiesJSON[domainName]) { - for (const cookieName in cookiesJSON[domainName][pathName]) { - cookiesJSON[domainName][pathName][cookieName] = tough_cookie_1.Cookie.fromJSON(JSON.stringify(cookiesJSON[domainName][pathName][cookieName])); - } - } - } - return cookiesJSON; - } - get filePath() { - return this._filePath; - } - async putCookie(cookie) { - await super.putCookie(cookie); - this.saveToFile(); - } - async updateCookie(oldCookie, newCookie) { - await super.updateCookie(oldCookie, newCookie); - this.saveToFile(); - } - async removeCookie(domain, path, key) { - await super.removeCookie(domain, path, key); - this.saveToFile(); - } - async removeCookies(domain, path) { - await super.removeCookies(domain, path); - this.saveToFile(); - } - async removeAllCookies() { - await super.removeAllCookies(); - this.saveToFile(); - } -} -exports.JSONCookieStore = JSONCookieStore; diff --git a/packages/cli/bin/util.js b/packages/cli/bin/util.js deleted file mode 100644 index 5b48a17..0000000 --- a/packages/cli/bin/util.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handleOutput = handleOutput; -const node_fs_1 = __importDefault(require("node:fs")); -/** - * Logs the data to the console or writes it to a file. - * @param data The data to be output - * @param output The path of the file to write the data to - */ -function handleOutput(data, output) { - if (output) { - node_fs_1.default.writeFileSync(output, JSON.stringify(data, null, 2)); - console.log("Output written to:", output); - } - else { - console.log(JSON.stringify(data, null, 2)); - } -} diff --git a/packages/cli/package.json b/packages/cli/package.json deleted file mode 100644 index e681579..0000000 --- a/packages/cli/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@iracing-data/cli", - "version": "0.0.2-alpha.0", - "main": "bin/index.js", - "bin": { - "iracing-data": "bin/index.js" - }, - "scripts": { - "codegen:readme": "pnpm start -h > README.md", - "dev": "ts-node --project tsconfig.build.json src/index.ts", - "build": "tsc --build tsconfig.build.json", - "start": "node bin/index.js" - }, - "dependencies": { - "@iracing-data/api": "workspace:*", - "@iracing-data/sync-car-assets": "workspace:*", - "@iracing-data/sync-track-assets": "workspace:*", - "commander": "13.1.0", - "inquirer": "^12.4.1", - "lodash": "^4.17.21", - "tough-cookie": "^5.1.1" - }, - "devDependencies": { - "@commander-js/extra-typings": "^13.1.0", - "typescript": "^5.9.2" - } -} \ No newline at end of file diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts deleted file mode 100644 index 856aa32..0000000 --- a/packages/cli/src/index.ts +++ /dev/null @@ -1,892 +0,0 @@ -#!/usr/bin/env node -import path from "path"; -import { Argument, Command } from "@commander-js/extra-typings"; -import { - IRacingAPISessionClient, - CATEGORY_VALUES, - assertCategory, - assertDivision, - hashPassword, -} from "@iracing-data/api"; -import { syncCarAssets as downloadCarAssets } from "@iracing-data/sync-car-assets"; -import { syncTrackAssets as downloadTrackAssets } from "@iracing-data/sync-track-assets"; -import inquirer from "inquirer"; -import { noop } from "lodash"; -import { CookieJar } from "tough-cookie"; -import { JSONCookieStore } from "./storage"; -import { handleOutput } from "./util"; - -const createCookieStore = (credentials: string) => { - return new JSONCookieStore(credentials); -}; - -const createCookieJar = (credentials: string) => { - return new CookieJar(createCookieStore(credentials)); -}; - -const createAPI = (credentials: string) => { - return new IRacingAPISessionClient(createCookieJar(credentials)); -}; - -const categoryArg = new Argument( - "", - "Category to fetch driver stats for" -) - .choices(CATEGORY_VALUES) - .argRequired(); - -/** - * Main program instance that provides a common interface for the CLI tool. - */ -const program = new Command("iracing-data") - .description("CLI tool for interacting with the iRacing API") - .version("0.0.0") - // ???: Should this remain a global option or be attached to relevant commands via Command subclass? - .option( - "--credentials ", - "Path to credentials file", - path.join(__dirname, "cookies.json") - ); - -/** - * whoami command - */ -program - .command("whoami") - .description("Prints the current session information.") - .action((_: object, command) => { - const { credentials } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(api.whoami() || "No session found."); - }); - -/** - * logout command - */ -program - .command("logout") - .description("Logs out of the current session.") - .action((_, command) => { - const { credentials } = command.optsWithGlobals(); - const cookieJar = createCookieJar(credentials); - cookieJar.removeAllCookies(noop); - console.log("Logged out."); - }); - -/** - * auth command - */ -program - .command("auth") - .description("Stores credentials for the iRacing API") - .option("-u, --username ", "iRacing username") - .action(async (_, command) => { - const { credentials, username: usernameOption } = command.optsWithGlobals(); - - const { username = usernameOption, password } = await inquirer.prompt([ - { - type: "input", - name: "username", - message: "Enter your username:", - when: () => !usernameOption, - }, - { - type: "password", - name: "password", - message: "Enter your password:", - mask: "*", - }, - ]); - - console.log(`Authenticating with ${username}...`); - const hashedPassword = await hashPassword(username, password); - const api = createAPI(credentials); - await api.authenticate({ username, password: hashedPassword }); - console.log("✅ Authentication successful"); - }); - -/** - * award-instances command - */ -program - .command("award-instances") - .argument("[customerId]", "Customer ID", parseInt) - .argument("", "Award ID", parseInt) - .description("Fetch award instances") - .option("-o, --output ", "Output path") - .action(async (customerId, awardId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const awardInstances = await api.memberAwardInstances({ - customerId, - awardId, - }); - - handleOutput(awardInstances, output); - }); - -/** - * car-assets command - */ -program - .command("car-assets") - .description("Fetch car assets") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const carAssets = await api.carAssets(); - - handleOutput(carAssets, output); - }); - -/** - * car command - */ -program - .command("car") - .description("Fetch car") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const car = await api.carGet(); - - handleOutput(car, output); - }); - -/** - * car-class command - */ -program - .command("car-class") - .description("Fetch car class") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const carClass = await api.carClassGet(); - - handleOutput(carClass, output); - }); - -/** - * categories command - */ -program - .command("categories") - .description("Fetch categories") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const categories = await api.constantsCategories(); - - handleOutput(categories, output); - }); - -/** - * countries command - */ -program - .command("countries") - .description("Fetch countries") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const countries = await api.lookupCountries(); - - handleOutput(countries, output); - }); - -/** - * divisions command - */ -program - .command("divisions") - .description("Fetch divisions") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const divisions = await api.constantsDivisions(); - - handleOutput(divisions, output); - }); - -/** - * docs command - */ -program - .command("docs") - .description("Downloads the latest API documentation from `/data/doc`") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const docs = await api.doc(); - - handleOutput(docs, output); - }); - -program - .command("download-car-assets") - .description("Downloads the latest car assets.") - .requiredOption("-o, --out-dir ", "Output directory") - .option("-i, --write-full-info", "Write full car info", false) - .option("--skip-info", "Skip writing car info", false) - .option("-a, --write-full-assets", "Write full car assets", false) - .option("--skip-assets", "Skip writing car asset", false) - .option("-u, --username ", "iRacing username") - .action(async (_, command) => { - console.log("Downloading car assets..."); - const { - credentials, - outDir, - writeFullAssets, - writeFullInfo, - skipInfo: skipCarInfo, - skipAssets: skipCarAssets, - username, - } = command.optsWithGlobals(); - const api = createAPI(credentials); - await downloadCarAssets( - { - outputDir: outDir, - writeFullAssets, - writeFullInfo, - skipCarAssets, - skipCarInfo, - username, - }, - api - ); - console.log("Done!"); - }); - -program - .command("download-track-assets") - .description("Downloads the latest track SVGs.") - .requiredOption("-o, --out-dir ", "Output directory") - .option("-f, --force", "Force download of existing SVG layers", false) - .option("-i, --write-full-info", "Write full track info", false) - .option("--skip-info", "Skip writing track info", false) - .option("-a, --write-full-assets", "Write full track assets", false) - .option("--skip-assets", "Skip writing track asset", false) - .option("--include-svgs", "Include SVGs", false) - .action(async (_, command) => { - console.log("Downloading track assets..."); - const { - credentials, - outDir, - writeFullAssets, - writeFullInfo, - skipAssets: skipTrackAssets, - skipInfo: skipTrackInfo, - includeSvgs, - force, - } = command.optsWithGlobals(); - const api = createAPI(credentials); - await downloadTrackAssets( - { - outputDir: outDir, - writeFullAssets, - writeFullInfo, - skipTrackAssets, - skipTrackInfo, - force, - includeSVGs: includeSvgs, - }, - api - ); - console.log("Done!"); - }); - -/** - * driver-stats - */ -program - .command("driver-stats") - .addArgument(categoryArg) - .description("Fetch driver stats") - .option("-o, --output ", "Output path") - .action(async (category, _, command) => { - assertCategory(category); - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const driverStats = await api.driverStatsByCategory({ category }); - - handleOutput(driverStats, output); - }); - -/** - * event-types command - */ -program - .command("event-types") - .description("Fetch event types") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const eventTypes = await api.constantsEventTypes(); - - handleOutput(eventTypes, output); - }); - -/** - * hosted command - */ -program - .command("hosted") - .description("Fetch hosted sessions") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const hostedSessions = await api.hostedSessions(); - - handleOutput(hostedSessions, output); - }); - -/** - * hosted-combined command - */ -program - .command("hosted-combined") - .description("Fetch hosted combined sessions") - .option("-p, --package-id ", "Package ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output, packageId } = command.optsWithGlobals(); - const api = createAPI(credentials); - const hostedCombinedSessions = await api.hostedCombinedSessions({ - packageId, - }); - - handleOutput(hostedCombinedSessions, output); - }); - -/** - * lap-data command - */ -program - .command("lap-data") - .argument("", "Subsession ID", parseInt) - .argument("", "Session number", parseInt) - .description("Fetch lap data") - .option("-c, --customer-id ", "Customer ID", parseInt) - .option("-t, --team-id ", "Team ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (subsessionId, sessionNumber, _, command) => { - const { credentials, customerId, teamId, output } = - command.optsWithGlobals(); - const api = createAPI(credentials); - const lapData = await api.resultsLapData({ - subsessionId, - simsessionNumber: sessionNumber, - customerId, - teamId, - }); - - handleOutput(lapData, output); - }); - -/** - * league command - */ -program - .command("league") - .argument("", "League ID", parseInt) - .description("Fetch league") - .option("-l, --include-licenses", "Include licenses") - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, includeLicenses, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - - console.log(`Fetching league ${leagueId}...`); - const league = await api.leagueGet({ leagueId, includeLicenses }); - - handleOutput(league, output); - }); - -/** - * league-directory command - */ -program - .command("league-directory") - .description("Fetch league directory") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching league directory..."); - console.log("TODO: Support params"); - const leagueDirectory = await api.leagueDirectory(); - - handleOutput(leagueDirectory, output); - }); - -/** - * league-membership command - */ -program - .command("league-membership") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch league membership") - .option("-l, --include-league", "Include league") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, includeLeague, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - - console.log(`Fetching league membership for ${customerId}...`); - const leagueMembership = await api.leagueMembership({ - customerId, - includeLeague, - }); - - handleOutput(leagueMembership, output); - }); - -/** - * league-points-systems command - */ -program - .command("league-points-systems") - .argument("", "League ID", parseInt) - .description("Fetch league points systems") - .option("-s, --season-id ", "Season ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, output, seasonId } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching league points systems..."); - const leaguePointsSystems = await api.leagueGetPointsSystems({ - leagueId, - seasonId, - }); - - handleOutput(leaguePointsSystems, output); - }); - -/** - * league-roster command - */ -program - .command("league-roster") - .argument("", "League ID", parseInt) - .description("Fetch league roster") - .option("-l, --include-licenses", "Include licenses") - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, includeLicenses, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - - console.log(`Fetching league roster for ${leagueId}...`); - const leagueRoster = await api.leagueRoster({ - leagueId, - includeLicenses, - }); - - handleOutput(leagueRoster, output); - }); - -/** - * league-seasons command - */ -program - .command("league-seasons") - .argument("", "League ID", parseInt) - .description("Fetch league seasons") - .option("-r, --retired", "Retired") - .option("-o, --output ", "Output path") - .action(async (leagueId, _, command) => { - const { credentials, retired, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - - console.log(`Fetching league seasons for ${leagueId}...`); - const leagueSeasons = await api.leagueSeasons({ leagueId, retired }); - - handleOutput(leagueSeasons, output); - }); - -/** - * league-season-sessions command - */ -program - .command("league-season-sessions") - .argument("", "League ID", parseInt) - .argument("", "Season ID", parseInt) - .description("Fetch league season sessions") - .option("-r, --results-only", "Results only") - .option("-o, --output ", "Output path") - .action(async (leagueId, seasonId, _, command) => { - const { credentials, output, resultsOnly } = command.optsWithGlobals(); - const api = createAPI(credentials); - - console.log( - `Fetching league season sessions for ${leagueId} ${seasonId}...` - ); - const leagueSeasonSessions = await api.leagueSeasonSessions({ - leagueId, - seasonId, - resultsOnly, - }); - - handleOutput(leagueSeasonSessions, output); - }); - -/** - * league-season-standings command - */ -program - .command("league-season-standings") - .argument("", "League ID", parseInt) - .argument("", "Season ID", parseInt) - .description("Fetch league season standings") - .option("-c, --car-class-id ", "Car class ID", parseInt) - .option("-C, --car-id ", "Car ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (leagueId, seasonId, _, command) => { - const { credentials, carClassId, carId, output } = - command.optsWithGlobals(); - const api = createAPI(credentials); - - console.log( - `Fetching league season standings for ${leagueId} ${seasonId}...` - ); - const leagueSeasonStandings = await api.leagueSeasonStandings({ - leagueId, - seasonId, - carClassId, - carId, - }); - - handleOutput(leagueSeasonStandings, output); - }); - -/** - * league-sessions command - */ -program - .command("league-sessions") - .description("Fetch league sessions") - .option("-m, --mine", "Mine") - .option("-p, --package-id ", "Package ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching league sessions..."); - const leagueSessions = await api.leagueCustomerLeagueSessions(); - - handleOutput(leagueSessions, output); - }); - -/** - * licenses command - */ -program - .command("licenses") - .description("Fetch licenses") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - const licenses = await api.lookupLicenses(); - - handleOutput(licenses, output); - }); - -/** - * member-awards command - */ -program - .command("member-awards") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch member awards") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member awards for ${customerId}...`); - const memberAwards = await api.memberAwards({ customerId }); - - handleOutput(memberAwards, output); - }); - -/** - * member-career-stats command - */ -program - .command("member-career-stats") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch member career stats") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member career stats for ${customerId}...`); - const memberCareerStats = await api.statsMemberCareer({ customerId }); - - handleOutput(memberCareerStats, output); - }); - -/** - * member-info command - */ -program - .command("member-info") - .description("Fetch member info") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member info...`); - const memberInfo = await api.memberInfo(); - - handleOutput(memberInfo, output); - }); - -/** - * member-participation command - */ -program - .command("member-participation") - .description("Fetch member info") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching member participation...`); - const participation = await api.memberParticipationCredits(); - - handleOutput(participation, output); - }); - -/** - * member-profile command - */ -program - .command("member-profile") - .argument("[customerId]", "Customer ID", parseInt) - .description("Fetch member profile") - .option("-o, --output ", "Output path") - .action(async (customerId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log( - `Fetching member profile${customerId ? ` for ${customerId}` : ""}...` - ); - const memberProfile = await api.memberProfile({ customerId }); - - handleOutput(memberProfile, output); - }); - -/** - * race-guide command - */ -program - .command("race-guide") - .argument( - "[from]", - "ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time." - ) - .description("Fetch race guide") - .option( - "-e, --end-after-from", - "Include sessions which start before 'from' but end after." - ) - .option("-o, --output ", "Output path") - .action(async (from, _, command) => { - const { endAfterFrom } = command.optsWithGlobals(); - // const api = createAPI(credentials); - console.log( - `Fetching race guide for ${from}. ${ - endAfterFrom ? "Including" : "Not including" - } sessions which start before 'from' but end after.` - ); - - console.error("!!!: Fix this"); - // const raceGuide = await api.getRaceGuide({ - // from: from ? Date.parse(from) : undefined, - // endAfterFrom, - // }); - // console.log(raceGuide); - }); - -/** - * race-results command - */ -program - .command("race-results") - .argument("", "Subsession ID", parseInt) - .description("Fetch race results for a given session") - .option("-l, --include-licenses", "Include licenses") - .option("-o, --output ", "Output path") - .action(async (subsessionId, _, command) => { - const { credentials, includeLicenses, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching race results for session ${subsessionId}...`); - const raceResults = await api.resultsGet({ - subsessionId, - includeLicenses, - }); - - handleOutput(raceResults, output); - }); - -/** - * search-drivers command - */ -program - .command("search-drivers") - .argument("", "Search query") - .description("Fetch drivers") - .option("-l, --league-id ", "League ID", parseInt) - .option("-o, --output ", "Output path") - .action(async (search, _, command) => { - const { credentials, output, leagueId } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Searching for drivers matching "${search}"...`); - const drivers = await api.lookupDrivers({ searchTerm: search, leagueId }); - - handleOutput(drivers, output); - }); - -/** - * search-hosted-results command - */ -program - .command("search-hosted-results") - .description("Fetch hosted results") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Searching for hosted results matching "undefined"...`); - console.log("TODO: Add support for params"); - const hostedResults = await api.resultsSearchHosted(); - - handleOutput(hostedResults, output); - }); - -/** - * season-driver-standings command - */ -program - .command("season-driver-standings") - .argument("", "Season ID", parseInt) - .argument("", "Car class ID", parseInt) - .description("Fetch season driver standings") - .option("-c, --club-id ", "Club ID", parseInt) - .option("-d, --division ", "Division", parseInt) - .option("-r, --race-week-number ", "Race week number", parseInt) - .option("-o, --output ", "Output path") - .action(async (seasonId, carClassId, _, command) => { - const { credentials, clubId, division, raceWeekNumber, output } = - command.optsWithGlobals(); - - assertDivision(division); - - const api = createAPI(credentials); - console.log( - `Fetching season driver standings for ${seasonId} ${carClassId}...` - ); - const seasonDriverStandings = await api.statsSeasonDriverStandings({ - seasonId, - carClassId, - division, - raceWeekNumber, - }); - - handleOutput(seasonDriverStandings, output); - }); - -/** - * season-list command - */ -program - .command("season-list") - .argument("", "Season year", parseInt) - .argument("", "Season quarter", parseInt) - .description("Fetch season list") - .option("-o, --output ", "Output path") - .action(async (seasonYear, seasonQuarter, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching season list..."); - const seasonList = await api.seasonList({ seasonYear, seasonQuarter }); - - handleOutput(seasonList, output); - }); - -/** - * series command - */ -program - .command("series") - .description("Fetch series") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching series..."); - const series = await api.seriesGet(); - - handleOutput(series, output); - }); - -/** - * series-past-seasons command - */ -program - .command("series-past-seasons") - .argument("", "Series ID", parseInt) - .description("Fetch series past seasons") - .option("-o, --output ", "Output path") - .action(async (seriesId, _, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log(`Fetching past seasons for series ${seriesId}...`); - const seriesPastSeasons = await api.seriesPastSeasons({ seriesId }); - - handleOutput(seriesPastSeasons, output); - }); - -/** - * track-assets command - */ -program - .command("track-assets") - .description("Fetch track assets") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching track assets..."); - const trackAssets = await api.trackAssets(); - - handleOutput(trackAssets, output); - }); - -/** - * track-info command - */ -program - .command("track-info") - .description("Fetch track info") - .option("-o, --output ", "Output path") - .action(async (_, command) => { - const { credentials, output } = command.optsWithGlobals(); - const api = createAPI(credentials); - console.log("Fetching track info..."); - const trackInfo = await api.trackGet(); - - handleOutput(trackInfo, output); - }); - -program.parse(); diff --git a/packages/cli/src/storage.ts b/packages/cli/src/storage.ts deleted file mode 100644 index d32a129..0000000 --- a/packages/cli/src/storage.ts +++ /dev/null @@ -1,98 +0,0 @@ -import fs from "fs"; -import util from "util"; -import { - Cookie, - MemoryCookieStore, - MemoryCookieStoreIndex, -} from "tough-cookie"; - -/** - * Subclass of the `MemoryCookieStore` that persists cookies to a JSON file after all operations. - */ -export class JSONCookieStore extends MemoryCookieStore { - private _filePath: string; - - constructor(filePath: string) { - super(); - this._filePath = filePath; - if (util.inspect.custom) { - this[util.inspect.custom] = this.inspect; - } - this.idx = this.loadFromFile(); - } - - private inspect() { - return `{ idx: ${util.inspect(this.idx, false, 2)} }`; - } - - private saveToFile() { - fs.writeFileSync(this.filePath, JSON.stringify(this.idx)); - } - - private loadFromFile(): MemoryCookieStoreIndex { - let cookieData: string | null = null; - let cookiesJSON = {}; - - // If the file exists, load the raw data from the file path - if (fs.existsSync(this.filePath)) { - cookieData = fs.readFileSync(this.filePath, "utf8"); - } - - if (cookieData) { - try { - cookiesJSON = JSON.parse(cookieData); - } catch (error) { - console.error(error); - throw new Error(`Could not parse cookie file at ${this.filePath}.`); - } - } - - for (const domainName in cookiesJSON) { - for (const pathName in cookiesJSON[domainName]) { - for (const cookieName in cookiesJSON[domainName][pathName]) { - cookiesJSON[domainName][pathName][cookieName] = Cookie.fromJSON( - JSON.stringify(cookiesJSON[domainName][pathName][cookieName]) - ); - } - } - } - - return cookiesJSON; - } - - get filePath() { - return this._filePath; - } - - override async putCookie(cookie: Cookie): Promise { - await super.putCookie(cookie); - this.saveToFile(); - } - - override async updateCookie( - oldCookie: Cookie, - newCookie: Cookie - ): Promise { - await super.updateCookie(oldCookie, newCookie); - this.saveToFile(); - } - - override async removeCookie( - domain: string, - path: string, - key: string - ): Promise { - await super.removeCookie(domain, path, key); - this.saveToFile(); - } - - override async removeCookies(domain: string, path: string): Promise { - await super.removeCookies(domain, path); - this.saveToFile(); - } - - override async removeAllCookies(): Promise { - await super.removeAllCookies(); - this.saveToFile(); - } -} diff --git a/packages/cli/src/util.ts b/packages/cli/src/util.ts deleted file mode 100644 index f5f21cc..0000000 --- a/packages/cli/src/util.ts +++ /dev/null @@ -1,14 +0,0 @@ -import fs from "node:fs"; -/** - * Logs the data to the console or writes it to a file. - * @param data The data to be output - * @param output The path of the file to write the data to - */ -export function handleOutput(data: object, output?: string) { - if (output) { - fs.writeFileSync(output, JSON.stringify(data, null, 2)); - console.log("Output written to:", output); - } else { - console.log(JSON.stringify(data, null, 2)); - } -} diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json deleted file mode 100644 index 5c1c0a5..0000000 --- a/packages/cli/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig/node.json", - "compilerOptions": { - "rootDir": "./src", - "outDir": "./bin", - "lib": ["dom"], - "noUnusedLocals": false, - // !!!: Don't output declaration or source maps - // !!!: This is a CLI, not a library, no need. - "declaration": false, - "declarationMap": false, - "sourceMap": false - }, - "exclude": ["node_modules", "bin", "dist"] -} diff --git a/packages/helpers/api-schema-to-openapi/README.md b/packages/helpers/api-schema-to-openapi/README.md new file mode 100644 index 0000000..6c52553 --- /dev/null +++ b/packages/helpers/api-schema-to-openapi/README.md @@ -0,0 +1,30 @@ +# @iracing-data/api-schema-to-openapi-schema + +Helper function to generate OpenAPI (Swagger) spec from [iRacing API zod schema](../../api-schema/). + +## Installation + +```sh +$ pnpm add -D @iracing/data/api-schema-to-openapi +``` + +## Usage + +### CLI + +```sh +$ iracing-api-openapi -f openapi.json -o ~/Desktop +``` + +### Programmatically + +```ts +import { generateOpenAPISpect } from "@iracing-data/api-schema-to-openapi"; + +await generateOpenAPISpec({ + fileName: "openapi.json", + outputDir: "~/Desktop", +}); + +console.log("Output schema to", path.join(output, file)); +``` diff --git a/packages/helpers/api-schema-to-openapi/package.json b/packages/helpers/api-schema-to-openapi/package.json new file mode 100644 index 0000000..17e71f7 --- /dev/null +++ b/packages/helpers/api-schema-to-openapi/package.json @@ -0,0 +1,21 @@ +{ + "name": "@iracing-data/api-schema-to-openapi", + "version": "0.0.0-alpha.0", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "bin": { + "iracing-api-openapi": "dist/cli.js" + }, + "scripts": { + "build": "tsc --build tsconfig.build.json" + }, + "dependencies": { + "@iracing-data/api-schema": "workspace:*", + "commander": "^14.0.2", + "zod": "^4.1.12", + "zod-openapi": "^5.4.3" + }, + "devDependencies": { + "@commander-js/extra-typings": "^14.0.0" + } +} \ No newline at end of file diff --git a/packages/helpers/api-schema-to-openapi/src/cli.ts b/packages/helpers/api-schema-to-openapi/src/cli.ts new file mode 100644 index 0000000..5024463 --- /dev/null +++ b/packages/helpers/api-schema-to-openapi/src/cli.ts @@ -0,0 +1,24 @@ +#!/usr/bin/env node + +import path from "node:path"; +import { Command } from "@commander-js/extra-typings"; +import { generateOpenAPISpec } from "./"; + +const program = new Command("iracing-api-openapi") + .requiredOption("-o, --output ", "Output path") + .option( + "-f, --file ", + "The name of the output file. Defaults to 'openapi.json'" + ) + .action(async (_, command) => { + const { output, file = "openapi.json" } = command.optsWithGlobals(); + + await generateOpenAPISpec({ + fileName: file, + outputDir: output, + }); + + console.log("Output schema to", path.join(output, file)); + }); + +program.parse(); diff --git a/packages/helpers/api-schema-to-openapi/src/index.ts b/packages/helpers/api-schema-to-openapi/src/index.ts new file mode 100644 index 0000000..e4a883a --- /dev/null +++ b/packages/helpers/api-schema-to-openapi/src/index.ts @@ -0,0 +1,2267 @@ +import fs from "node:fs"; +import path from "node:path"; +import { + IRacingAPIResponseSchema, + IRacingAuthParametersSchema, + IRacingDriverStatsByCategoryPathSchema, + IRacingErrorResponseSchema, + IRacingHostedCombinedSessionsParametersSchema, + IRacingLeagueCustomerSessionsParametersSchema, + IRacingLeagueDirectoryParametersSchema, + IRacingLeagueGetParametersSchema, + IRacingLeagueGetPointsSystemsParametersSchema, + IRacingLeagueMembershipParametersSchema, + IRacingLeagueRosterParametersSchema, + IRacingLeagueSeasonSessionsParametersSchema, + IRacingLeagueSeasonsParametersSchema, + IRacingLeagueSeasonStandingsParametersSchema, + IRacingLookupDriversParametersSchema, + IRacingMemberAwardInstancesParametersSchema, + IRacingMemberAwardsParametersSchema, + IRacingMemberChartDataParametersSchema, + IRacingMemberGetParametersSchema, + IRacingMemberProfileParametersSchema, + IRacingRateLimitHeadersSchema, + IRacingRateLimitLimitHeaderSchema, + IRacingRateLimitRemainingHeaderSchema, + IRacingRateLimitResetHeaderSchema, + IRacingResultsEventLogParametersSchema, + IRacingResultsGetParametersSchema, + IRacingResultsLapChartDataParametersSchema, + IRacingResultsLapDataParametersSchema, + IRacingResultsSearchHostedParametersSchema, + IRacingResultsSearchSeriesParametersSchema, + IRacingResultsSeasonResultsParametersSchema, + IRacingSeasonListParametersSchema, + IRacingSeasonRaceGuideParametersSchema, + IRacingSeasonSpectatorSubsessionidsDetailParametersSchema, + IRacingSeasonSpectatorSubsessionidsParametersSchema, + IRacingSeriesPastSeasonsParametersSchema, + IRacingSeriesSeasonListParametersSchema, + IRacingSeriesSeasonScheduleParametersSchema, + IRacingSeriesSeasonsParametersSchema, + IRacingServiceDocsResponseSchema, + IRacingServiceMethodDocsResponseSchema, + IRacingServicesDocsResponseSchema, + IRacingStatsMemberBestsParametersSchema, + IRacingStatsMemberCareerParametersSchema, + IRacingStatsMemberDivisionParametersSchema, + IRacingStatsMemberRecapParametersSchema, + IRacingStatsMemberRecentRacesParametersSchema, + IRacingStatsMemberSummaryParametersSchema, + IRacingStatsMemberYearlyParametersSchema, + IRacingStatsSeasonDriverStandingsParametersSchema, + IRacingStatsSeasonQualifyResultsParametersSchema, + IRacingStatsSeasonSupersessionStandingsParametersSchema, + IRacingStatsSeasonTeamStandingsParametersSchema, + IRacingStatsSeasonTTResultsParametersSchema, + IRacingStatsSeasonTTStandingsParametersSchema, + IRacingStatsWorldRecordsParametersSchema, + IRacingTeamGetParametersSchema, + IRacingTimeAttackMemberSeasonResultsParametersSchema, +} from "@iracing-data/api-schema"; +import { createDocument } from "zod-openapi"; + +export interface GenerateOpenAPISpecOptions { + outputDir?: string; + fileName?: string; +} + +export async function generateOpenAPISpec({ + outputDir = __dirname, + fileName = "openapi.json", +}: GenerateOpenAPISpecOptions) { + const outputPath = path.join(outputDir, fileName); + + // Create the output dir if it doesn't exist + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }); + } + + const document = createDocument({ + openapi: "3.1.1", + info: { + title: "iRacing `/data` API", + version: "0.0.1", + }, + servers: [{ url: "https://members-ng.iracing.com/" }], + externalDocs: { + url: "/data/doc", + description: + "Find more information on available services here. Requires authentication.", + }, + components: { + headers: { + rateLimitLimit: IRacingRateLimitLimitHeaderSchema, + rateLimitRemaining: IRacingRateLimitRemainingHeaderSchema, + rateLimitReset: IRacingRateLimitResetHeaderSchema, + }, + responses: { + Success: { + description: "Success", + headers: IRacingRateLimitHeadersSchema, + content: { + "application/json": { + schema: IRacingAPIResponseSchema, + }, + }, + }, + Docs: { + description: "Success", + content: { + "application/json": { schema: IRacingServicesDocsResponseSchema }, + }, + }, + ServiceDocs: { + description: "Success", + content: { + "application/json": { schema: IRacingServiceDocsResponseSchema }, + }, + }, + ServiceMethodDocs: { + description: "Success", + content: { + "application/json": { + schema: IRacingServiceMethodDocsResponseSchema, + }, + }, + }, + RateLimited: { + description: "Rate limited", + headers: IRacingRateLimitHeadersSchema, + content: { + "application/json": { + schema: IRacingErrorResponseSchema, + }, + }, + }, + Maintenance: { + description: "Maintenance", + content: { + "application/json": { + schema: IRacingErrorResponseSchema, + }, + }, + }, + Unauthorized: { + description: "Access token is missing or invalid.", + content: { + "application/json": { + schema: IRacingErrorResponseSchema, + }, + }, + }, + }, + securitySchemes: { + bearerAuth: { + type: "http", + scheme: "bearer", + bearerFormat: "JWT", + description: "JWT Authentication", + }, + oAuth2: { + type: "oauth2", + description: + "OAuth service for obtaining a JWT. For more information, see https://oauth.iracing.com/oauth2/book/introduction.html", + flows: { + authorizationCode: { + authorizationUrl: "https://oauth.iracing.com/oauth2/authorize", + tokenUrl: "https://oauth.iracing.com/oauth2/token", + scopes: { + "iracing.auth": "Authorization for iRacing services.", + "iracing.profile": "Access to the iRacing profile.", + }, + }, + }, + }, + }, + }, + security: [ + { + bearerAuth: [], + }, + ], + tags: [ + { + name: "auth", + description: "Auth endpoint.", + }, + { + name: "doc", + description: "A documentation endpoint.", + }, + { + name: "car", + description: "Car service endpoint.", + }, + { + name: "carclass", + description: "Car class service endpoint.", + }, + { name: "constants", description: "Constants service endpoint." }, + { name: "driver_stats", description: "Driver stats service endpoint." }, + { name: "hosted", description: "Hosted service endpoint." }, + { name: "league", description: "League service endpoint" }, + { + name: "lookup", + description: + "Lookup endpoints for static reference data (countries, licenses, drivers, etc.)", + }, + { + name: "member", + description: + "Member profile and related endpoints (profile, awards, participation credits).", + }, + { + name: "results", + description: + "Race and session result endpoints (lap data, event logs, season results).", + }, + { + name: "season", + description: + "Season-related endpoints (season lists, race guides, schedules).", + }, + { + name: "series", + description: "Series endpoints (series metadata, seasons, assets).", + }, + { + name: "stats", + description: + "Statistical endpoints and summaries for members and seasons.", + }, + { + name: "team", + description: "Team endpoints (team details, membership).", + }, + { + name: "time_attack", + description: + "Time attack specific endpoints and member season results.", + }, + { name: "track", description: "Track metadata and asset endpoints." }, + ], + paths: { + "/auth": { + post: { + operationId: "postAuth", + tags: ["auth"], + requestBody: { + content: { + "application/json": { + schema: IRacingAuthParametersSchema, + }, + }, + }, + responses: {}, + }, + }, + "/data/doc": { + get: { + operationId: "getDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/Docs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/carclass": { + get: { + operationId: "getCarClassDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/carclass/get": { + get: { + operationId: "getCarClassGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/car": { + get: { + operationId: "getCarDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/car/assets": { + get: { + operationId: "getCarAssetsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/car/get": { + get: { + operationId: "getCarGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/constants": { + get: { + operationId: "getConstantsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/constants/categories": { + get: { + operationId: "getConstantsCategoriesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/constants/divisions": { + get: { + operationId: "getConstantsDivisionsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/constants/event_types": { + get: { + operationId: "getConstantsEventTypesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/driver_stats_by_category": { + get: { + operationId: "getDriverStatsByCategoryDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/driver_stats_by_category/{category}": { + get: { + operationId: "getDriverStatsByCategoryCategoryDocs", + tags: ["doc"], + requestParams: { + path: IRacingDriverStatsByCategoryPathSchema, + }, + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/hosted": { + get: { + operationId: "getHostedDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/hosted/combined_sessions": { + get: { + operationId: "getHostedCombinedSessionsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/hosted/sessions": { + get: { + operationId: "getHostedSessionsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league": { + get: { + operationId: "getLeagueDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/cust_league_sessions": { + get: { + operationId: "getLeagueCustomerLeagueSessionsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/directory": { + get: { + operationId: "getLeagueDirectoryDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/get": { + get: { + operationId: "getLeagueGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/get_points_systems": { + get: { + operationId: "getLeagueGetPointsSystemsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/membership": { + get: { + operationId: "getLeagueMembershipDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/roster": { + get: { + operationId: "getLeagueRosterDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/seasons": { + get: { + operationId: "getLeagueSeasonsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/season_standings": { + get: { + operationId: "getLeagueSeasonStandingsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/league/season_sessions": { + get: { + operationId: "getLeagueSeasonSessionsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/lookup": { + get: { + operationId: "getLookupDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/lookup/countries": { + get: { + operationId: "getLookupCountriesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/lookup/drivers": { + get: { + operationId: "getLookupDriversDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/lookup/flairs": { + get: { + operationId: "getLookupFlairsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/lookup/get": { + get: { + operationId: "getLookupGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/lookup/licenses": { + get: { + operationId: "getLookupLicensesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member": { + get: { + operationId: "getMemberDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/awards": { + get: { + operationId: "getMemberAwardsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/award_instances": { + get: { + operationId: "getMemberAwardInstancesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/chart_data": { + get: { + operationId: "getMemberChartDataDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/get": { + get: { + operationId: "getMemberGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/info": { + get: { + operationId: "getMemberInfoDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/participation_credits": { + get: { + operationId: "getMemberParticipationCreditsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/member/profile": { + get: { + operationId: "getMemberProfileDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results": { + get: { + operationId: "getResultsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/get": { + get: { + operationId: "getResultsGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/event_log": { + get: { + operationId: "getResultsEventLogDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/lap_chart_data": { + get: { + operationId: "getResultsLapChartDataDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/lap_data": { + get: { + operationId: "getResultsLapDataDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/search_hosted": { + get: { + operationId: "getResultsSearchHostedDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/search_series": { + get: { + operationId: "getResultsSearchSeriesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/results/season_results": { + get: { + operationId: "getResultsSeasonResultsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/season": { + get: { + operationId: "getSeasonDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/season/list": { + get: { + operationId: "getSeasonListDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/season/race_guide": { + get: { + operationId: "getSeasonRaceGuideDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/season/spectator_subsessionids": { + get: { + operationId: "getSeasonSpectatorSubsessionIdsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/season/spectator_subsessionids_detail": { + get: { + operationId: "getSeasonSpectatorSubsessionIdsDetailDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series": { + get: { + operationId: "getSeriesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/assets": { + get: { + operationId: "getSeriesAssetsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/get": { + get: { + operationId: "getSeriesGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/past_seasons": { + get: { + operationId: "getSeriesPastSeasonsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/seasons": { + get: { + operationId: "getSeriesSeasonsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/season_list": { + get: { + operationId: "getSeriesSeasonListDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/season_schedule": { + get: { + operationId: "getSeriesSeasonScheduleDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/series/stats_series": { + get: { + operationId: "getSeriesStatsSeriesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats": { + get: { + operationId: "getStatsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_bests": { + get: { + operationId: "getStatsMemberBestsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_career": { + get: { + operationId: "getStatsMemberCareerDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_division": { + get: { + operationId: "getStatsMemberDivisionDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_recap": { + get: { + operationId: "getStatsMemberRecapDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_recent_races": { + get: { + operationId: "getStatsMemberRecentRacesDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_summary": { + get: { + operationId: "getStatsMemberSummaryDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/member_yearly": { + get: { + operationId: "getStatsMemberYearlyDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/season_driver_standings": { + get: { + operationId: "getStatsSeasonDriverStandingsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/season_supersession_standings": { + get: { + operationId: "getStatsSeasonSupersessionStandingsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/season_team_standings": { + get: { + operationId: "getStatsSeasonTeamStandingsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/season_tt_standings": { + get: { + operationId: "getStatsSeasonTTStandingsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/season_tt_results": { + get: { + operationId: "getStatsSeasonTTResultsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/season_qualify_results": { + get: { + operationId: "getStatsSeasonQualifyResultsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/stats/world_records": { + get: { + operationId: "getStatsWorldRecordsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/team": { + get: { + operationId: "getTeamDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/team/get": { + get: { + operationId: "getTeamGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/team/membership": { + get: { + operationId: "getTeamMembershipDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/time_attack": { + get: { + operationId: "getTimeAttackDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/time_attack/member_season_results": { + get: { + operationId: "getTimeAttackMemberSeasonResultsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/track": { + get: { + operationId: "getTrackDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/track/assets": { + get: { + operationId: "getTrackAssetsDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/doc/track/get": { + get: { + operationId: "getTrackGetDocs", + tags: ["doc"], + responses: { + 200: { $ref: "#/components/responses/ServiceMethodDocs" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/data/carclass/get": { + get: { + operationId: "getCarClass", + summary: "Gets car classes.", + tags: ["carclass"], + externalDocs: { + url: "/data/doc/carclass/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/car/assets": { + get: { + operationId: "getCarAssets", + description: + "image paths are relative to https://images-static.iracing.com/", + tags: ["car"], + externalDocs: { + url: "/data/doc/car/assets", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/car/get": { + get: { + operationId: "getCar", + tags: ["car"], + externalDocs: { + url: "/data/doc/car/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/constants/categories": { + get: { + operationId: "getConstantsCategories", + description: "Constant; returned directly as an array of objects", + tags: ["constants"], + externalDocs: { + url: "/data/doc/constants/categories", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/constants/divisions": { + get: { + operationId: "getConstantsDivisions", + description: "Constant; returned directly as an array of objects", + tags: ["constants"], + externalDocs: { + url: "/data/doc/constants/divisions", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/constants/event_types": { + get: { + operationId: "getConstantsEventTypes", + description: "Constant; returned directly as an array of objects", + tags: ["constants"], + externalDocs: { + url: "/data/doc/constants/event_types", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/driver_stats_by_category/{category}": { + get: { + operationId: "getDriverStatsByCategory", + requestParams: { + path: IRacingDriverStatsByCategoryPathSchema, + }, + tags: ["driver_stats"], + externalDocs: { + url: "/data/doc/driver_stats_by_category/{category}", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/hosted/combined_sessions": { + get: { + operationId: "getHostedCombinedSessions", + description: + "Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user.", + requestParams: { + query: IRacingHostedCombinedSessionsParametersSchema, + }, + tags: ["hosted"], + externalDocs: { + url: "/data/doc/hosted/combined_sessions", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/hosted/sessions": { + get: { + operationId: "getHostedSessions", + description: + "Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user.", + tags: ["hosted"], + externalDocs: { + url: "/data/doc/hosted/sessions", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/cust_league_sessions": { + get: { + operationId: "getLeagueCustomerLeagueSessions", + tags: ["league"], + requestParams: { + query: IRacingLeagueCustomerSessionsParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/cust_league_sessions", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/directory": { + get: { + operationId: "getLeagueDirectory", + tags: ["league"], + requestParams: { + query: IRacingLeagueDirectoryParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/directory", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/get": { + get: { + operationId: "getLeague", + tags: ["league"], + requestParams: { + query: IRacingLeagueGetParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/get_points_systems": { + get: { + operationId: "getLeaguePointsSystems", + tags: ["league"], + requestParams: { + query: IRacingLeagueGetPointsSystemsParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/get_points_systems", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/membership": { + get: { + operationId: "getLeagueMembership", + tags: ["league"], + requestParams: { + query: IRacingLeagueMembershipParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/membership", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/roster": { + get: { + operationId: "getLeagueRoster", + tags: ["league"], + requestParams: { + query: IRacingLeagueRosterParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/roster", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/seasons": { + get: { + operationId: "getLeagueSeasons", + tags: ["league"], + requestParams: { + query: IRacingLeagueSeasonsParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/seasons", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/season_standings": { + get: { + operationId: "getLeagueSeasonStandings", + tags: ["league"], + requestParams: { + query: IRacingLeagueSeasonStandingsParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/season_standings", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/league/season_sessions": { + get: { + operationId: "getLeagueSeasonSessions", + tags: ["league"], + requestParams: { + query: IRacingLeagueSeasonSessionsParametersSchema, + }, + externalDocs: { + url: "/data/doc/league/season_sessions", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/lookup/countries": { + get: { + operationId: "getLookupCountries", + tags: ["lookup"], + externalDocs: { + url: "/data/doc/lookup/countries", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/lookup/flairs": { + get: { + operationId: "getLookupFlairs", + tags: ["lookup"], + externalDocs: { + url: "/data/doc/lookup/flairs", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/lookup/licenses": { + get: { + operationId: "getLookupLicenses", + tags: ["lookup"], + externalDocs: { + url: "/data/doc/lookup/licenses", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/lookup/drivers": { + get: { + operationId: "getLookupDrivers", + requestParams: { + query: IRacingLookupDriversParametersSchema, + }, + tags: ["lookup"], + externalDocs: { + url: "/data/doc/lookup/drivers", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/lookup/get": { + get: { + operationId: "getLookup", + // requestParams: { + // query: z.record(z.string(), z.string()), + // }, + tags: ["lookup"], + externalDocs: { + url: "/data/doc/lookup/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/awards": { + get: { + operationId: "getMemberAwards", + requestParams: { + query: IRacingMemberAwardsParametersSchema, + }, + tags: ["member"], + externalDocs: { + url: "/data/doc/member/awards", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/award_instances": { + get: { + operationId: "getMemberAwardInstances", + requestParams: { + query: IRacingMemberAwardInstancesParametersSchema, + }, + tags: ["member"], + externalDocs: { + url: "/data/doc/member/award_instances", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/chart_data": { + get: { + operationId: "getMemberChartData", + tags: ["member"], + requestParams: { + query: IRacingMemberChartDataParametersSchema, + }, + externalDocs: { + url: "/data/doc/member/chart_data", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/get": { + get: { + operationId: "getMember", + tags: ["member"], + externalDocs: { + url: "/data/doc/member/get", + }, + requestParams: { + query: IRacingMemberGetParametersSchema, + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/info": { + get: { + operationId: "getMemberInfo", + tags: ["member"], + externalDocs: { + url: "/data/doc/member/info", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/participation_credits": { + get: { + operationId: "getMemberParticipationCredits", + tags: ["member"], + externalDocs: { + url: "/data/doc/member/participation_credits", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/member/profile": { + get: { + operationId: "getMemberProfile", + summary: "Gets a requested user's profile.", + requestParams: { + query: IRacingMemberProfileParametersSchema, + }, + tags: ["member"], + externalDocs: { + url: "/data/doc/member/profile", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/get": { + get: { + operationId: "getResults", + tags: ["results"], + requestParams: { + query: IRacingResultsGetParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/event_log": { + get: { + operationId: "getResultsEventLog", + tags: ["results"], + requestParams: { + query: IRacingResultsEventLogParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/event_log", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/lap_chart_data": { + get: { + operationId: "getResultsLapChartData", + tags: ["results"], + requestParams: { + query: IRacingResultsLapChartDataParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/lap_chart_data", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/lap_data": { + get: { + operationId: "getResultsLapData", + tags: ["results"], + requestParams: { + query: IRacingResultsLapDataParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/lap_data", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/search_hosted": { + get: { + operationId: "getResultsSearchHosted", + tags: ["results"], + requestParams: { + query: IRacingResultsSearchHostedParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/search_hosted", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/search_series": { + get: { + operationId: "getResultsSearchSeries", + tags: ["results"], + requestParams: { + query: IRacingResultsSearchSeriesParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/search_series", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/results/season_results": { + get: { + operationId: "getResultsSeasonResults", + tags: ["results"], + requestParams: { + query: IRacingResultsSeasonResultsParametersSchema, + }, + externalDocs: { + url: "/data/doc/results/season_results", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/season/list": { + get: { + operationId: "getSeasonList", + requestParams: { + query: IRacingSeasonListParametersSchema, + }, + tags: ["season"], + externalDocs: { + url: "/data/doc/season/list", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/season/race_guide": { + get: { + operationId: "getSeasonRaceGuide", + requestParams: { + query: IRacingSeasonRaceGuideParametersSchema, + }, + tags: ["season"], + externalDocs: { + url: "/data/doc/season/race_guide", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/season/spectator_subsessionids": { + get: { + operationId: "getSeasonSpectatorSubsessionIds", + tags: ["season"], + requestParams: { + query: IRacingSeasonSpectatorSubsessionidsParametersSchema, + }, + externalDocs: { + url: "/data/doc/season/spectator_subsessionids", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/season/spectator_subsessionids_detail": { + get: { + operationId: "getSeasonSpectatorSubsessionIdsDetail", + tags: ["season"], + requestParams: { + query: IRacingSeasonSpectatorSubsessionidsDetailParametersSchema, + }, + externalDocs: { + url: "/data/doc/season/spectator_subsessionids_detail", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/assets": { + get: { + operationId: "getSeriesAssets", + tags: ["series"], + externalDocs: { + url: "/data/doc/series/assets", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/get": { + get: { + operationId: "getSeries", + tags: ["series"], + externalDocs: { + url: "/data/doc/series/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/past_seasons": { + get: { + operationId: "getSeriesPastSeasons", + requestParams: { + query: IRacingSeriesPastSeasonsParametersSchema, + }, + tags: ["series"], + externalDocs: { + url: "/data/doc/series/past_seasons", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/seasons": { + get: { + operationId: "getSeriesSeasons", + requestParams: { + query: IRacingSeriesSeasonsParametersSchema, + }, + tags: ["series"], + externalDocs: { + url: "/data/doc/series/seasons", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/season_list": { + get: { + operationId: "getSeriesSeasonList", + requestParams: { + query: IRacingSeriesSeasonListParametersSchema, + }, + tags: ["series"], + externalDocs: { + url: "/data/doc/series/season_list", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/season_schedule": { + get: { + operationId: "getSeriesSeasonSchedule", + requestParams: { + query: IRacingSeriesSeasonScheduleParametersSchema, + }, + tags: ["series"], + externalDocs: { + url: "/data/doc/series/season_schedule", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/series/stats_series": { + get: { + operationId: "getSeriesStatsSeries", + tags: ["series"], + externalDocs: { + url: "/data/doc/series/stats_series", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_bests": { + get: { + operationId: "getStatsMemberBests", + requestParams: { + query: IRacingStatsMemberBestsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_bests", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_career": { + get: { + operationId: "getStatsMemberCareer", + requestParams: { + query: IRacingStatsMemberCareerParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_career", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_division": { + get: { + operationId: "getStatsMemberDivision", + requestParams: { + query: IRacingStatsMemberDivisionParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_division", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_recap": { + get: { + operationId: "getStatsMemberRecap", + requestParams: { + query: IRacingStatsMemberRecapParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_recap", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_recent_races": { + get: { + operationId: "getStatsMemberRecentRaces", + requestParams: { + query: IRacingStatsMemberRecentRacesParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_recent_races", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_summary": { + get: { + operationId: "getStatsMemberSummary", + requestParams: { + query: IRacingStatsMemberSummaryParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_summary", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/member_yearly": { + get: { + operationId: "getStatsMemberYearly", + requestParams: { + query: IRacingStatsMemberYearlyParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/member_yearly", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/season_driver_standings": { + get: { + operationId: "getStatsSeasonDriverStandings", + requestParams: { + query: IRacingStatsSeasonDriverStandingsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/season_driver_standings", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/season_supersession_standings": { + get: { + operationId: "getStatsSeasonSupersessionStandings", + requestParams: { + query: IRacingStatsSeasonSupersessionStandingsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/season_supersession_standings", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/season_team_standings": { + get: { + operationId: "getStatsSeasonTeamStandings", + requestParams: { + query: IRacingStatsSeasonTeamStandingsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/season_team_standings", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/season_time_trial_standings": { + get: { + operationId: "getStatsSeasonTimeTrialStandings", + requestParams: { + query: IRacingStatsSeasonTTStandingsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/season_time_trial_standings", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/season_time_trial_results": { + get: { + operationId: "getStatsSeasonTimeTrialResults", + requestParams: { + query: IRacingStatsSeasonTTResultsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/season_time_trial_results", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/season_qualify_results": { + get: { + operationId: "getStatsSeasonQualifyResults", + requestParams: { + query: IRacingStatsSeasonQualifyResultsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/season_qualify_results", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/stats/world_records": { + get: { + operationId: "getStatsWorldRecords", + requestParams: { + query: IRacingStatsWorldRecordsParametersSchema, + }, + tags: ["stats"], + externalDocs: { + url: "/data/doc/stats/world_records", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/team/get": { + get: { + operationId: "getTeam", + requestParams: { + query: IRacingTeamGetParametersSchema, + }, + tags: ["team"], + externalDocs: { + url: "/data/doc/team/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/team/membership": { + get: { + operationId: "getTeamMembership", + tags: ["team"], + externalDocs: { + url: "/data/doc/team/membership", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/time_attack/member_season_results": { + get: { + operationId: "getTimeAttackMemberSeasonResults", + requestParams: { + query: IRacingTimeAttackMemberSeasonResultsParametersSchema, + }, + tags: ["time_attack"], + externalDocs: { + url: "/data/doc/time_attack/member_season_results", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/track/assets": { + get: { + operationId: "getTrackAssets", + tags: ["track"], + externalDocs: { + url: "/data/doc/track/assets", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + "/data/track/get": { + get: { + operationId: "getTrack", + tags: ["track"], + externalDocs: { + url: "/data/doc/track/get", + }, + responses: { + 200: { $ref: "#/components/responses/Success" }, + 429: { $ref: "#/components/responses/RateLimited" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + 503: { $ref: "#/components/responses/Maintenance" }, + }, + }, + }, + }, + }); + + // Remove the existing file + if (fs.existsSync(outputPath)) { + fs.unlinkSync(outputPath); + } + + // Write to file. + console.log(`Writing to ${outputPath}`); + fs.writeFileSync(outputPath, JSON.stringify(document)); +} diff --git a/packages/api/tsconfig.build.json b/packages/helpers/api-schema-to-openapi/tsconfig.build.json similarity index 66% rename from packages/api/tsconfig.build.json rename to packages/helpers/api-schema-to-openapi/tsconfig.build.json index d0fb85d..b949552 100644 --- a/packages/api/tsconfig.build.json +++ b/packages/helpers/api-schema-to-openapi/tsconfig.build.json @@ -1,9 +1,11 @@ { - "extends": "../../tsconfig/node.json", + "extends": "../../../tsconfig/node.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", "noUnusedLocals": false, + "declarationMap": false, + "sourceMap": false, "paths": { "@/*": ["./src/*"] } diff --git a/examples/oauth-example/tsconfig.json b/packages/helpers/api-schema-to-openapi/tsconfig.json similarity index 100% rename from examples/oauth-example/tsconfig.json rename to packages/helpers/api-schema-to-openapi/tsconfig.json diff --git a/packages/helpers/oauth-schema-to-openapi/README.md b/packages/helpers/oauth-schema-to-openapi/README.md new file mode 100644 index 0000000..de9393c --- /dev/null +++ b/packages/helpers/oauth-schema-to-openapi/README.md @@ -0,0 +1,30 @@ +# @iracing-data/api-schema-to-openapi + +Helper function to generate OpenAPI (Swagger) spec from [iRacing OAuth API zod schema](../../oauth/schema/). + +## Installation + +```sh +$ pnpm add -D @iracing/data/oauth-schema-to-openapi +``` + +## Usage + +### CLI + +```sh +$ iracing-oauth-api-openapi -f openapi.json -o ~/Desktop +``` + +### Programmatically + +```ts +import { generateOpenAPISpect } from "@iracing-data/oauth-schema-to-openapi"; + +await generateOpenAPISpec({ + fileName: "openapi-oauth.json", + outputDir: "~/Desktop", +}); + +console.log("Output schema to", path.join(output, file)); +``` diff --git a/packages/helpers/oauth-schema-to-openapi/package.json b/packages/helpers/oauth-schema-to-openapi/package.json new file mode 100644 index 0000000..2699bca --- /dev/null +++ b/packages/helpers/oauth-schema-to-openapi/package.json @@ -0,0 +1,22 @@ +{ + "name": "@iracing-data/oauth-schema-to-openapi", + "version": "0.0.0-alpha.0", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "bin": { + "iracing-oauth-api-openapi": "dist/cli.js" + }, + "scripts": { + "build": "tsc --build tsconfig.build.json" + }, + "dependencies": { + "@iracing-data/api-schema": "workspace:*", + "@iracing-data/oauth-schema": "workspace:*", + "commander": "^14.0.2", + "zod": "^4.1.12", + "zod-openapi": "^5.4.3" + }, + "devDependencies": { + "@commander-js/extra-typings": "^14.0.0" + } +} \ No newline at end of file diff --git a/packages/helpers/oauth-schema-to-openapi/src/cli.ts b/packages/helpers/oauth-schema-to-openapi/src/cli.ts new file mode 100644 index 0000000..1782186 --- /dev/null +++ b/packages/helpers/oauth-schema-to-openapi/src/cli.ts @@ -0,0 +1,24 @@ +#!/usr/bin/env node + +import path from "node:path"; +import { Command } from "@commander-js/extra-typings"; +import { generateOpenAPISpec } from "."; + +const program = new Command("iracing-oauth-api-openapi") + .requiredOption("-o, --output ", "Output path") + .option( + "-f, --file ", + "The name of the output file. Defaults to 'openapi.json'" + ) + .action(async (_, command) => { + const { output, file = "openapi.json" } = command.optsWithGlobals(); + + await generateOpenAPISpec({ + fileName: file, + outputDir: output, + }); + + console.log("Output schema to", path.join(output, file)); + }); + +program.parse(); diff --git a/packages/helpers/oauth-schema-to-openapi/src/index.ts b/packages/helpers/oauth-schema-to-openapi/src/index.ts new file mode 100644 index 0000000..b1ae05e --- /dev/null +++ b/packages/helpers/oauth-schema-to-openapi/src/index.ts @@ -0,0 +1,208 @@ +import { + IRacingOAuthErrorResponseSchema, + IRacingOAuthAuthorizeParametersSchema, + IRacingOAuthHeadersSchema, + IRacingOAuthProfileResponseSchema, + IRacingOAuthRequestIdHeaderSchema, + IRacingOAuthRevokeCurrentSessionInputSchema, + IRacingOAuthRevokeSessionsInputSchema, + IRacingOAuthSessionsSchema, + IRacingOAuthTokenParametersSchema, + IRacingOAuthTokenResponseSchema, +} from "@iracing-data/oauth-schema"; +import fs from "node:fs"; +import path from "node:path"; +import { createDocument } from "zod-openapi"; + +export interface GenerateOpenAPISpecOptions { + outputDir?: string; + fileName?: string; +} + +export async function generateOpenAPISpec({ + outputDir = __dirname, + fileName = "openapi.json", +}: GenerateOpenAPISpecOptions) { + const outputPath = path.join(outputDir, fileName); + + // Create the output dir if it doesn't exist + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }); + } + + const document = createDocument({ + openapi: "3.1.1", + info: { + title: "iRacing OAuth API", + version: "0.0.1", + }, + servers: [ + { + url: "https://oauth.iracing.com/oauth2", + description: "iRacing OAuth server.", + }, + ], + externalDocs: { + url: "/book", + }, + components: { + headers: { + oAuthRequestId: IRacingOAuthRequestIdHeaderSchema, + }, + responses: { + SessionsRevoked: { + headers: IRacingOAuthHeadersSchema, + description: "Session(s) were successfully revoked.", + }, + Unauthorized: { + description: "Access token is missing or invalid.", + content: { + "application/json": { + schema: IRacingOAuthErrorResponseSchema, + }, + }, + }, + }, + securitySchemes: { + bearerAuth: { + type: "http", + scheme: "bearer", + bearerFormat: "JWT", + description: "JWT Authentication", + }, + }, + }, + paths: { + "/iracing/profile": { + get: { + operationId: "getProfile", + security: [{ bearerAuth: [] }], + responses: { + 200: { + description: "Success", + headers: IRacingOAuthHeadersSchema, + content: { + "application/json": { + schema: IRacingOAuthProfileResponseSchema, + }, + }, + }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/sessions": { + get: { + operationId: "getSessions", + security: [{ bearerAuth: [] }], + responses: { + 200: { + description: "Success", + headers: IRacingOAuthHeadersSchema, + content: { + "application/json": { + schema: IRacingOAuthSessionsSchema, + }, + }, + }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/revoke/current": { + post: { + operationId: "revokeCurrent", + security: [{ bearerAuth: [] }], + requestBody: { + content: { + "application/x-www-form-urlencoded": { + schema: IRacingOAuthRevokeCurrentSessionInputSchema, + }, + }, + }, + responses: { + 200: { $ref: "#/components/responses/SessionsRevoked" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/revoke/sessions": { + post: { + operationId: "revokeSessions", + security: [{ bearerAuth: [] }], + requestBody: { + content: { + "application/x-www-form-urlencoded": { + schema: IRacingOAuthRevokeSessionsInputSchema, + }, + }, + }, + responses: { + 200: { $ref: "#/components/responses/SessionsRevoked" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/revoke/client": { + post: { + operationId: "revokeClient", + security: [{ bearerAuth: [] }], + responses: { + 200: { $ref: "#/components/responses/SessionsRevoked" }, + 401: { $ref: "#/components/responses/Unauthorized" }, + }, + }, + }, + "/authorize": { + get: { + operationId: "authorize", + requestParams: { + query: IRacingOAuthAuthorizeParametersSchema, + }, + responses: { + 302: { + description: "Redirect back to the provided redirect_uri", + }, + }, + }, + }, + "/token": { + post: { + operationId: "exchangeToken", + requestBody: { + content: { + "application/x-www-form-urlencoded": { + schema: IRacingOAuthTokenParametersSchema, + }, + }, + }, + responses: { + 200: { + description: "Success", + headers: IRacingOAuthHeadersSchema, + content: { + "application/json": { schema: IRacingOAuthTokenResponseSchema }, + }, + }, + 400: { + description: "Failure", + headers: IRacingOAuthHeadersSchema, + content: { + "application/json": { schema: IRacingOAuthErrorResponseSchema }, + }, + }, + }, + }, + }, + }, + }); + + // Remove the existing file + if (fs.existsSync(outputPath)) { + fs.unlinkSync(outputPath); + } + + // Write to file. + console.log(`Writing to ${outputPath}`); + fs.writeFileSync(outputPath, JSON.stringify(document)); +} diff --git a/packages/helpers/oauth-schema-to-openapi/tsconfig.build.json b/packages/helpers/oauth-schema-to-openapi/tsconfig.build.json new file mode 100644 index 0000000..b949552 --- /dev/null +++ b/packages/helpers/oauth-schema-to-openapi/tsconfig.build.json @@ -0,0 +1,14 @@ +{ + "extends": "../../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "noUnusedLocals": false, + "declarationMap": false, + "sourceMap": false, + "paths": { + "@/*": ["./src/*"] + } + }, + "exclude": ["node_modules", "dist"] +} diff --git a/packages/cli/tsconfig.json b/packages/helpers/oauth-schema-to-openapi/tsconfig.json similarity index 100% rename from packages/cli/tsconfig.json rename to packages/helpers/oauth-schema-to-openapi/tsconfig.json diff --git a/packages/helpers/sync-car-assets/package.json b/packages/helpers/sync-car-assets/package.json index f5c9673..c202297 100644 --- a/packages/helpers/sync-car-assets/package.json +++ b/packages/helpers/sync-car-assets/package.json @@ -1,33 +1,12 @@ { "name": "@iracing-data/sync-car-assets", - "version": "0.0.2-alpha.2", - "type": "module", + "version": "0.0.2-alpha.3", "main": "dist/index.js", - "bin": { - "sync-iracing-car-assets": "dist/cli.js" - }, "scripts": { - "build": "tsc --build tsconfig.build.json", - "build:executable:macos": "./scripts/build-executable-macos.sh", - "build:executable:windows": "./scripts/build-executable-windows.sh", - "bundle": "esbuild src/cli.ts --bundle --platform=node --tsconfig=tsconfig.build.json --outfile=build/cli.cjs --format=cjs" + "build": "tsc --build tsconfig.build.json" }, "dependencies": { - "@commander-js/extra-typings": "^13.1.0", - "@iracing-data/api": "workspace:*", - "commander": "^14.0.0", - "dotenv": "16.4.7" - }, - "peerDependencies": { - "inquirer": "^12.4.1" - }, - "peerDependenciesMeta": { - "inquirer": { - "optional": true - } - }, - "devDependencies": { - "esbuild": "^0.25.9", - "inquirer": "^12.9.4" + "@iracing-data/api-client-fetch": "workspace:*", + "@iracing-data/api-schema": "workspace:*" } } \ No newline at end of file diff --git a/packages/helpers/sync-car-assets/src/cli.ts b/packages/helpers/sync-car-assets/src/cli.ts deleted file mode 100644 index ce319cf..0000000 --- a/packages/helpers/sync-car-assets/src/cli.ts +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -import { Command } from "@commander-js/extra-typings"; -import { syncCarAssets } from "./index.js"; - -const program = new Command("sync-iracing-car-assets") - .description("Downloads the latest car assets.") - .requiredOption("-o, --out-dir ", "Output directory") - .option("-i, --write-full-info", "Write full car info", false) - .option("--skip-info", "Skip writing car info", false) - .option("-a, --write-full-assets", "Write full car assets", false) - .option("--skip-assets", "Skip writing car asset", false) - .option("-u, --username ", "iRacing username") - .action(async (_, command) => { - console.log("Downloading car assets..."); - - const { - outDir, - writeFullAssets, - writeFullInfo, - skipInfo: skipCarInfo, - skipAssets: skipCarAssets, - username, - } = command.optsWithGlobals(); - - await syncCarAssets({ - outputDir: outDir, - writeFullAssets, - writeFullInfo, - skipCarAssets, - skipCarInfo, - username, - }); - - console.log("Done!"); - }); - -program.parse(); diff --git a/packages/helpers/sync-car-assets/src/index.ts b/packages/helpers/sync-car-assets/src/index.ts index 30f5217..d1400d3 100644 --- a/packages/helpers/sync-car-assets/src/index.ts +++ b/packages/helpers/sync-car-assets/src/index.ts @@ -1,10 +1,11 @@ import { writeFile, mkdir } from "node:fs/promises"; import path from "node:path"; -import { IRacingAPISessionClient, hashPassword } from "@iracing-data/api"; -import * as dotenv from "dotenv"; -import { exists, getIRacingCredentials } from "./util.js"; - -dotenv.config(); +import { CarApi } from "@iracing-data/api-client-fetch"; +import { + IRacingGetCarResponse, + IRacingGetCarAssetsResponse, +} from "@iracing-data/api-schema"; +import { exists, fetchAPIResponseData } from "./util.js"; export interface SyncCarAssetsOptions { /** @@ -12,12 +13,6 @@ export interface SyncCarAssetsOptions { */ outputDir: string; - /** - * iRacing username. - * @default undefined - */ - username?: string; - /** * Write full car info to the output directory. * @default false @@ -54,26 +49,13 @@ export interface SyncCarAssetsOptions { export async function syncCarAssets( { outputDir, - username: usernameProp, writeFullAssets = false, writeFullInfo = false, skipCarInfo = false, skipCarAssets = false, }: SyncCarAssetsOptions, - client: IRacingAPISessionClient = new IRacingAPISessionClient() + client: CarApi = new CarApi() ) { - /** - * Authenticate with the iRacing API if no credentials are found. - */ - const needAuth = client.whoami() === null; - if (needAuth) { - console.log("No credentials found. Authenticating with iRacing API."); - const { username, password } = await getIRacingCredentials(usernameProp); - const hashedPassword = await hashPassword(username, password); - await client.authenticate({ username, hashedPassword }); - console.log("Authenticated with user:", client.whoami()); - } - /** * Create the output directory if it doesn't exist. */ @@ -87,8 +69,10 @@ export async function syncCarAssets( * Get the JSON data for the track assets and track info from the API. */ const [cars, carInfo] = await Promise.all([ - client.carAssets(), - client.carGet(), + client + .getCarAssets() + .then(fetchAPIResponseData), + client.getCar().then(fetchAPIResponseData), ]); /** diff --git a/packages/helpers/sync-car-assets/src/util.ts b/packages/helpers/sync-car-assets/src/util.ts index a0261a1..31c1efb 100644 --- a/packages/helpers/sync-car-assets/src/util.ts +++ b/packages/helpers/sync-car-assets/src/util.ts @@ -1,4 +1,4 @@ -import assert from "node:assert"; +import { IracingAPIResponse } from "@iracing-data/api-client-fetch"; import { access, constants } from "node:fs/promises"; /** @@ -15,71 +15,15 @@ export const exists = async (path: string) => { } }; -/** - * Attempts to read credentials from the environment variables. If not provided, - * prompts the user to enter them. - * @returns The parsed credentials. - */ -export async function getIRacingCredentials(usernameProp?: string) { - /** - * The provided username, or the username from the environment variable, or undefined. - */ - const usernameOption = - (usernameProp ?? process.env.IRACING_USERNAME) - ? `${usernameProp ?? process.env.IRACING_USERNAME}` - : undefined; - - /** - * The password from the envrionment variable, or undefined. - */ - const passwordOption = process.env.IRACING_PASSWORD - ? `${process.env.IRACING_PASSWORD}` - : undefined; - - /** - * If inquirer is available, prompt the user for their credentials, - * else assert the credentials are provided and return them. - */ - try { - let { default: inquirer } = require("inquirer"); - const { username = usernameOption, password = passwordOption } = - await inquirer.prompt([ - { - type: "input", - name: "username", - message: "Enter your username:", - when: () => !usernameOption, - }, - { - type: "password", - name: "password", - message: "Enter your password:", - mask: "*", - when: () => !passwordOption, - }, - ]); - - assert( - username && username.length > 0, - "Could not find username via environment variable (IRACING_USERNAME), please update your env or enter when prompted." - ); - assert( - password && password.length > 0, - "Could not find password via environment variable (IRACING_PASSWORD), please update your env or enter when prompted." - ); - - return { username, password }; - } catch (error) { - console.error(error); - assert( - usernameOption && usernameOption.length > 0, - "Please provide username via environment variable (IRACING_USERNAME)." - ); - assert( - passwordOption && passwordOption.length > 0, - "Please provider password via environment variable (IRACING_PASSWORD)." - ); - - return { username: usernameOption, password: passwordOption }; +export async function fetchAPIResponseData({ + expires, + link, +}: IracingAPIResponse) { + const expirationDate = new Date(expires); + if (expirationDate.getTime() < Date.now()) { + throw new Error("Data is expired!"); } + + const data = await fetch(link); + return (await data.json()) as T; } diff --git a/packages/helpers/sync-track-assets/package.json b/packages/helpers/sync-track-assets/package.json index 0419b9f..c0295c5 100644 --- a/packages/helpers/sync-track-assets/package.json +++ b/packages/helpers/sync-track-assets/package.json @@ -2,26 +2,11 @@ "name": "@iracing-data/sync-track-assets", "version": "0.0.2-alpha.2", "main": "dist/index.js", - "bin": { - "sync-iracing-track-assets": "dist/cli.js" - }, "scripts": { "build": "tsc --build tsconfig.build.json" }, "dependencies": { - "@iracing-data/api": "workspace:*", - "commander": "^14.0.0", - "dotenv": "16.4.7" - }, - "peerDependencies": { - "inquirer": "^12.4.1" - }, - "peerDependenciesMeta": { - "inquirer": { - "optional": true - } - }, - "devDependencies": { - "@commander-js/extra-typings": "^13.1.0" + "@iracing-data/api-client-fetch": "workspace:*", + "@iracing-data/api-schema": "workspace:*" } } \ No newline at end of file diff --git a/packages/helpers/sync-track-assets/src/cli.ts b/packages/helpers/sync-track-assets/src/cli.ts deleted file mode 100644 index 38ca6c4..0000000 --- a/packages/helpers/sync-track-assets/src/cli.ts +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env node - -import { Command } from "@commander-js/extra-typings"; -import { syncTrackAssets } from "./"; - -const program = new Command("sync-iracing-track-assets") - .description("Downloads the latest track SVGs.") - .requiredOption("-o, --out-dir ", "Output directory") - .option("-f, --force", "Force download of existing SVG layers", false) - .option("-i, --write-full-info", "Write full track info", false) - .option("--skip-info", "Skip writing track info", false) - .option("-a, --write-full-assets", "Write full track assets", false) - .option("--skip-assets", "Skip writing track asset", false) - .option("--include-svgs", "Include SVGs", false) - .action(async (_, command) => { - console.log("Downloading track assets..."); - - const { - outDir, - writeFullAssets, - writeFullInfo, - skipAssets: skipTrackAssets, - skipInfo: skipTrackInfo, - includeSvgs, - force, - } = command.optsWithGlobals(); - - await syncTrackAssets({ - outputDir: outDir, - writeFullAssets, - writeFullInfo, - skipTrackAssets, - skipTrackInfo, - force, - includeSVGs: includeSvgs, - }); - - console.log("Done!"); - }); - -program.parse(); diff --git a/packages/helpers/sync-track-assets/src/index.ts b/packages/helpers/sync-track-assets/src/index.ts index 5c002c2..afb9174 100644 --- a/packages/helpers/sync-track-assets/src/index.ts +++ b/packages/helpers/sync-track-assets/src/index.ts @@ -1,22 +1,11 @@ import { writeFile, mkdir } from "node:fs/promises"; import path from "node:path"; -import { IRacingAPISessionClient, hashPassword } from "@iracing-data/api"; -import * as dotenv from "dotenv"; -import { exists, getIRacingCredentials } from "./util"; - -dotenv.config(); - -export interface TrackInfo { - track_id: number; -} - -export interface TrackAsset { - track_id: string; - track_map: string; - track_map_layers: Record; -} - -export type TrackAssetIndex = Record; +import { exists, fetchAPIResponseData } from "./util"; +import { TrackApi } from "@iracing-data/api-client-fetch"; +import { + IRacingGetTrackAssetsResponse, + IRacingGetTrackResponse, +} from "@iracing-data/api-schema"; export interface SyncTrackAssetsOptions { /** @@ -24,12 +13,6 @@ export interface SyncTrackAssetsOptions { */ outputDir: string; - /** - * iRacing username. - * @default undefined - */ - username?: string; - /** * Force download of track layers even if they already exist. * @default false @@ -79,7 +62,6 @@ export interface SyncTrackAssetsOptions { export async function syncTrackAssets( { outputDir, - username: usernameProp, force = false, writeFullAssets = false, writeFullInfo = false, @@ -87,20 +69,8 @@ export async function syncTrackAssets( skipTrackInfo = false, includeSVGs = false, }: SyncTrackAssetsOptions, - client: IRacingAPISessionClient = new IRacingAPISessionClient() + client: TrackApi = new TrackApi() ) { - /** - * Authenticate with the iRacing API if no credentials are found. - */ - const needAuth = client.whoami() === null; - if (needAuth) { - console.log("No credentials found. Authenticating with iRacing API."); - const { username, password } = await getIRacingCredentials(usernameProp); - const hashedPassword = await hashPassword(username, password); - await client.authenticate({ username, password: hashedPassword }); - console.log("Authenticated with user:", client.whoami()); - } - /** * Create the output directory if it doesn't exist. */ @@ -113,9 +83,12 @@ export async function syncTrackAssets( /** * Get the JSON data for the track assets and track info from the API. */ - const [tracks, trackInfo] = await Promise.all< - [Promise, Promise] - >([client.trackAssets(), client.trackGet()]); + const [tracks, trackInfo] = await Promise.all([ + client + .getTrackAssets() + .then(fetchAPIResponseData), + client.getTrack().then(fetchAPIResponseData), + ]); /** * Write the data if requested. @@ -134,7 +107,7 @@ export async function syncTrackAssets( console.log("Downloading assets for", Object.keys(tracks).length, "tracks."); - for (const [trackId, asset] of Object.entries(tracks)) { + for (const [trackId, asset] of Object.entries(tracks)) { const info = trackInfo.find((t) => t.track_id === +trackId); const trackDir = path.join(outputDir, trackId); const assetPath = path.join(trackDir, "assets.json"); @@ -175,8 +148,8 @@ export async function syncTrackAssets( } else { // Get the asset from the URL and write to the file. console.log("\tDownloading layer:", layer, "from", layerUrl); - const response = await client.client.get(layerUrl); - const svg = response.data; + const response = await fetch(layerUrl); + const svg = await response.text(); await writeFile(layerPath, svg, "utf8"); } }) diff --git a/packages/helpers/sync-track-assets/src/util.ts b/packages/helpers/sync-track-assets/src/util.ts index 4a4a423..ab7aa81 100644 --- a/packages/helpers/sync-track-assets/src/util.ts +++ b/packages/helpers/sync-track-assets/src/util.ts @@ -1,15 +1,6 @@ +import { IracingAPIResponse } from "@iracing-data/api-client-fetch"; import assert from "node:assert"; import { access, constants } from "node:fs/promises"; - -async function getInquirer() { - try { - const inquirerPath = require.resolve("inquirer"); - return await import(inquirerPath); - } catch (_error) { - return null; - } -} - /** * Checks if a file exists. * @param path the path of the file @@ -24,66 +15,15 @@ export const exists = async (path: string) => { } }; -/** - * Attempts to read credentials from the environment variables. If not provided, - * prompts the user to enter them. - * @returns The parsed credentials. - */ -export async function getIRacingCredentials(usernameProp?: string) { - /** - * The provided username, or the username from the environment variable, or undefined. - */ - const usernameOption = - usernameProp ?? process.env.IRACING_USERNAME - ? `${process.env.IRACING_USERNAME}` - : undefined; - - /** - * The password from the envrionment variable, or undefined. - */ - const passwordOption = process.env.IRACING_PASSWORD - ? `${process.env.IRACING_PASSWORD}` - : undefined; - - const inquirer = await getInquirer(); - if (inquirer) { - const { username = usernameOption, password = passwordOption } = - await inquirer.prompt([ - { - type: "input", - name: "username", - message: "Enter your username:", - when: () => !usernameOption, - }, - { - type: "password", - name: "password", - message: "Enter your password:", - mask: "*", - when: () => !passwordOption, - }, - ]); - - assert( - username && username.length > 0, - "Could not find username via environment variable (IRACING_USERNAME), please update your env or enter when prompted." - ); - assert( - password && password.length > 0, - "Could not find password via environment variable (IRACING_PASSWORD), please update your env or enter when prompted." - ); - - return { username, password }; - } else { - assert( - usernameOption && usernameOption.length > 0, - "Please provide username via environment variable (IRACING_USERNAME)." - ); - assert( - passwordOption && passwordOption.length > 0, - "Please provider password via environment variable (IRACING_PASSWORD)." - ); - - return { username: usernameOption, password: passwordOption }; +export async function fetchAPIResponseData({ + expires, + link, +}: IracingAPIResponse) { + const expirationDate = new Date(expires); + if (expirationDate.getTime() < Date.now()) { + throw new Error("Data is expired!"); } + + const data = await fetch(link); + return (await data.json()) as T; } diff --git a/packages/oauth/client/package.json b/packages/oauth/client/package.json index 4763e51..b145e23 100644 --- a/packages/oauth/client/package.json +++ b/packages/oauth/client/package.json @@ -7,7 +7,8 @@ "build": "tsc --build tsconfig.build.json" }, "dependencies": { + "@iracing-data/oauth-schema": "workspace:*", "oauth4webapi": "^3.7.0", - "zod": "^4.0.17" + "zod": "^4.1.12" } } \ No newline at end of file diff --git a/packages/oauth/client/src/client.ts b/packages/oauth/client/src/client.ts index 154b99b..e5b40c0 100644 --- a/packages/oauth/client/src/client.ts +++ b/packages/oauth/client/src/client.ts @@ -1,15 +1,20 @@ +import assert from "node:assert"; +import { + IRacingOAuthTokenResponseSchema, + IRacingOAuthTokenResponse, + IRacingOAuthPasswordLimitedGrantParametersSchema, +} from "@iracing-data/oauth-schema"; import * as oauth from "oauth4webapi"; import { OAuthCallbackError } from "./oauth-callback-error"; import { IRacingOAuthClientMetadata, IRacingOAuthClientMetadataInput, IRacingOAuthClientMetadataSchema, - IRacingOAuthTokenResponseSchema, StateStore, } from "./schema"; -import { sanitizeTokenResponse } from "./utils"; +import { hashPassword, sanitizeTokenResponse } from "./utils"; -type OAuthClientOptions = { +export type OAuthClientOptions = { // Config clientMetadata: Readonly; @@ -29,12 +34,13 @@ export class OAuthClient { this.stateStore = stateStore; } - async authorize({ signal }: { signal?: AbortSignal } = {}) { + /** + * Generates an Authorization URL for kicking off the OAuth flow. + * @returns The URL, verifier, and state parameter. + */ + async authorize() { const verifier = oauth.generateRandomCodeVerifier(); const challenge = await oauth.calculatePKCECodeChallenge(verifier); - - signal?.throwIfAborted(); - const state = oauth.generateRandomState(); await this.stateStore.set(state, { @@ -43,8 +49,6 @@ export class OAuthClient { appState: state, }); - signal?.throwIfAborted(); - const authorizationUrl = new URL(this.clientMetadata.authorizationUrl); authorizationUrl.searchParams.set("response_type", "code"); @@ -71,6 +75,12 @@ export class OAuthClient { return { url: authorizationUrl, verifier, state }; } + /** + * Given the parameters from the authorization server, + * fetches the token. + * @param params The query parameters from the authorization server. + * @returns The auth token. + */ async callback(params: URLSearchParams) { const stateParam = params.get("state"); const codeParam = params.get("code"); @@ -152,4 +162,59 @@ export class OAuthClient { return await IRacingOAuthTokenResponseSchema.parseAsync(result); } + + async passwordLimitedGrant() { + assert( + this.clientMetadata.username, + "To use the password limited grant, a username must be provided." + ); + + assert( + this.clientMetadata.password, + "To use the password limited grant, a password must be provided." + ); + + const parameters = + await IRacingOAuthPasswordLimitedGrantParametersSchema.parseAsync({ + grant_type: "password_limited", + client_id: this.clientMetadata.clientId, + client_secret: this.clientMetadata.clientSecret, + username: this.clientMetadata.username, + password: await hashPassword( + this.clientMetadata.username, + this.clientMetadata.password + ), + scope: this.clientMetadata.scopes.join(" "), + }); + + console.log("Send this to the iRacing OAuth service:", parameters); + } + + async refresh(token: string) { + const authorizationServer: oauth.AuthorizationServer = { + issuer: this.clientMetadata.issuer, + token_endpoint: this.clientMetadata.tokenUrl, + }; + + const client: oauth.Client = { + client_id: this.clientMetadata.clientId, + }; + + const response = await oauth.refreshTokenGrantRequest( + authorizationServer, + client, + oauth.None(), + token + ); + + const result = await oauth.processRefreshTokenResponse( + authorizationServer, + client, + response + ); + + return await IRacingOAuthTokenResponseSchema.parseAsync(result); + } } + +export type { IRacingOAuthTokenResponse }; diff --git a/packages/oauth/client/src/constants.ts b/packages/oauth/client/src/constants.ts deleted file mode 100644 index 063c18c..0000000 --- a/packages/oauth/client/src/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const BASE_URL = "https://oauth.iracing.com/oauth2"; -export const DEFAULT_AUTH_URL = `${BASE_URL}/authorize`; -export const DEFAULT_TOKEN_URL = `${BASE_URL}/token`; diff --git a/packages/oauth/client/src/index.ts b/packages/oauth/client/src/index.ts index 2b608c3..7d17b7e 100644 --- a/packages/oauth/client/src/index.ts +++ b/packages/oauth/client/src/index.ts @@ -1,3 +1,2 @@ export * from "./client"; -export * from "./constants"; export * from "./schema"; diff --git a/packages/oauth/client/src/schema/oauth.ts b/packages/oauth/client/src/schema/oauth.ts index c29c8b9..e767788 100644 --- a/packages/oauth/client/src/schema/oauth.ts +++ b/packages/oauth/client/src/schema/oauth.ts @@ -1,20 +1,31 @@ -import { z } from "zod/v4"; -import { DEFAULT_AUTH_URL, DEFAULT_TOKEN_URL, BASE_URL } from "../constants"; +import { z } from "zod"; +import { IRacingOAuthScopesSchema } from "@iracing-data/oauth-schema"; -// Allowed scopes. See: https://oauth.iracing.com/oauth2/book/scopes.html -export const IRacingOAuthScopeSchema = z.enum([ - "iracing.auth", - "iracing.profile", -]); +const DEFAULT_OAUTH_URL = "https://oauth.iracing.com/oauth2"; +const DEFAULT_AUTH_URL = `${DEFAULT_OAUTH_URL}/authorize`; +const DEFAULT_TOKEN_URL = `${DEFAULT_OAUTH_URL}/token`; -export const IRacingOAuthScopesSchema = z - .array(IRacingOAuthScopeSchema) - .min(1) - // Ensure uniqueness in the provided values - .refine( - (values) => new Set(values).size === values.length, - "Each value must be unique." - ); +export const IRacingOAuthBaseURL = z.literal(DEFAULT_OAUTH_URL).meta({ + id: "iracingOAuthURL", + title: "iRacing OAuth Service URL", + description: "The URL for the iRacing OAuth service", +}); + +export const IRacingOAuthAuthorizationURL = z + .templateLiteral([IRacingOAuthBaseURL, "/authorize"]) + .meta({ + id: "iracingOAuthAuthorizationURL", + title: "iRacing OAuth Service Authorization Endpoint", + description: "The endpoint for authorization.", + }); + +export const IRacingOAuthTokenURL = z + .templateLiteral([IRacingOAuthBaseURL, "/token"]) + .meta({ + id: "iracingOAuthTokenURL", + title: "iRacing OAuth Service Token Endpoint", + description: "The endpoint for token exchange.", + }); export const IRacingOAuthClientMetadataSchema = z .object({ @@ -25,7 +36,7 @@ export const IRacingOAuthClientMetadataSchema = z id: "authorizationUrl", title: "Authorization URL", description: `The URL to use when making authorization requests. Defaults to "${DEFAULT_AUTH_URL}"`, - note: "The default is acceptable in 99% of use-cases, but is able to be overridden in case iRacing makes changes to the URLs.", + note: "The default is acceptable in 99.9% of use-cases, but is able to be overridden in case iRacing makes changes to the URLs.", }), tokenUrl: z .url() @@ -34,18 +45,18 @@ export const IRacingOAuthClientMetadataSchema = z id: "tokenUrl", title: "Token URL", description: `The URL to use when making token requests. Defaults to "${DEFAULT_TOKEN_URL}"`, - note: "The default is acceptable in 99% of use-cases, but is able to be overridden in case iRacing makes changes to the URLs.", + note: "The default is acceptable in 99.9% of use-cases, but is able to be overridden in case iRacing makes changes to the URLs.", }), issuer: z .url() - .default(BASE_URL) + .default(DEFAULT_OAUTH_URL) .meta({ id: "issuer", title: "Issuer", - description: `The OAuth2.0 issuer to use in discovery cases. Defaults to "${BASE_URL}"`, - note: "The default is acceptable in 99% of use-cases, but is able to be overridden in case iRacing makes changes to the URLs.", + description: `The OAuth2.0 issuer to use in discovery cases. Defaults to "${DEFAULT_OAUTH_URL}"`, + note: "The default is acceptable in 99.9% of use-cases, but is able to be overridden in case iRacing makes changes to the URLs.", }), - scopes: IRacingOAuthScopesSchema.meta({ + scopes: z.array(IRacingOAuthScopesSchema).meta({ id: "scopes", title: "Scopes", description: @@ -57,6 +68,24 @@ export const IRacingOAuthClientMetadataSchema = z description: "The client ID provided by iRacing after client registration. See: https://oauth.iracing.com/oauth2/book/client_registration.html", }), + clientSecret: z.string().optional().meta({ + id: "clientSecret", + title: "Client secret", + description: + "The client secret optionally provided by iRacing during client registration. See: https://oauth.iracing.com/oauth2/book/client_registration.html", + }), + username: z.string().optional().meta({ + id: "username", + title: "Email address or username.", + description: + "The email address or other issued identifier for a user. Only used in the password limited grant.", + }), + password: z.string().optional().meta({ + id: "password", + title: "User password", + description: + "The password of the user. Only used in the password limited grant.", + }), redirectUri: z.url().meta({ id: "redirectUri", title: "Redirect URI", @@ -76,25 +105,15 @@ export const IRacingOAuthClientMetadataSchema = z description: "Metadata the user must provide to use the client.", }); -export const IRacingOAuthCallbackSchema = z.object({ - state: z.string(), - code: z.string(), -}); - -export const IRacingOAuthTokenResponseSchema = z.object({ - access_token: z.string(), - token_type: z.literal("bearer"), - expires_in: z.number(), - refresh_token: z.string().optional(), - refresh_token_expires_in: z.number().optional(), - scope: z.string().trim(), -}); - /** * Type exports */ -export type IRacingOAuthScope = z.infer; +export type IRacingOAuthURL = z.infer; +export type IRacingAuthorizationURL = z.infer< + typeof IRacingOAuthAuthorizationURL +>; +export type IRacingTokenURL = z.infer; export type IRacingOAuthClientMetadataInput = z.input< typeof IRacingOAuthClientMetadataSchema @@ -103,11 +122,3 @@ export type IRacingOAuthClientMetadataInput = z.input< export type IRacingOAuthClientMetadata = z.infer< typeof IRacingOAuthClientMetadataSchema >; - -export type IRacingOAuthCallbackInput = z.infer< - typeof IRacingOAuthCallbackSchema ->; - -export type IRacingOAuthCallbackResponse = z.infer< - typeof IRacingOAuthTokenResponseSchema ->; diff --git a/packages/oauth/client/src/utils.ts b/packages/oauth/client/src/utils.ts index 999d4c8..1dffdd5 100644 --- a/packages/oauth/client/src/utils.ts +++ b/packages/oauth/client/src/utils.ts @@ -1,3 +1,5 @@ +import crypto from "node:crypto"; + export type OAuthTokenResponse = { access_token: string; token_type: "Bearer"; @@ -34,3 +36,13 @@ export async function sanitizeTokenResponse( headers: response.headers, }); } + +/** + * Compute the Base64‑encoded SHA‑256 hash of (password + email.toLowerCase()). + */ +export async function hashPassword(email: string, password: string) { + return crypto + .createHash("sha256") + .update(password + email.toLowerCase()) + .digest("base64"); +} diff --git a/packages/oauth/router/README.md b/packages/oauth/router/README.md new file mode 100644 index 0000000..ff4b0b7 --- /dev/null +++ b/packages/oauth/router/README.md @@ -0,0 +1,11 @@ +# @iracing-data/oauth-router + +A better-call router for the iRacing OAuth services. + +Adds a `/signin`, `signout`, and configurable callback API for the iRacing OAuth flow. + +Example can be found in [iracing-proxy-api-example](../../../examples/iracing-proxy-api-example). + +## Installation + +## Usage diff --git a/packages/oauth/router/openapi/spec.json b/packages/oauth/router/openapi/spec.json new file mode 100644 index 0000000..22e3860 --- /dev/null +++ b/packages/oauth/router/openapi/spec.json @@ -0,0 +1,521 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "iRacing OAuth API", + "version": "0.0.1" + }, + "servers": [ + { + "url": "https://oauth.iracing.com/oauth2", + "description": "iRacing OAuth server." + } + ], + "externalDocs": { + "url": "/oauth2/book" + }, + "paths": { + "/iracing/profile": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "x-request-id": { + "$ref": "#/components/headers/x-request-id" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "iracing_name": { + "type": "string" + }, + "iracing_cust_id": { + "type": "number" + } + }, + "required": [ + "iracing_name", + "iracing_cust_id" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + } + } + } + }, + "/sessions": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "x-request-id": { + "$ref": "#/components/headers/x-request-id" + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "session_id": { + "description": "A session identifier. This value is considered opaque and its format may change without warning at our discretion.", + "type": "string" + }, + "client_id": { + "description": "A client identifier.", + "type": "string" + }, + "client_name": { + "description": "The name of the client as selected during client registration.", + "type": "string" + }, + "client_developer_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "client_developer_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "client_developer_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "scope": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "scope_descriptions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "current_session": { + "type": "boolean" + }, + "impersonated": { + "type": "boolean" + }, + "impersonation_note": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_ip": { + "anyOf": [ + { + "type": "string", + "format": "ipv4", + "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" + }, + { + "type": "null" + } + ] + }, + "first_continent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_subdivisions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_user_agent_header": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_user_agent_operating_system": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "first_user_agent_browser": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_ip": { + "anyOf": [ + { + "type": "string", + "format": "ipv4", + "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$" + }, + { + "type": "null" + } + ] + }, + "last_continent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_country": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_subdivisions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_city": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_user_agent_header": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_user_agent_operating_system": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "last_user_agent_browser": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "session_id", + "client_id", + "client_name", + "client_developer_name", + "client_developer_url", + "client_developer_email", + "scope", + "scope_descriptions", + "current_session", + "impersonated", + "impersonation_note", + "first_ip", + "first_continent", + "first_country", + "first_subdivisions", + "first_city", + "first_user_agent_header", + "first_user_agent_operating_system", + "first_user_agent_browser", + "last_ip", + "last_continent", + "last_country", + "last_subdivisions", + "last_city", + "last_user_agent_header", + "last_user_agent_operating_system", + "last_user_agent_browser" + ], + "additionalProperties": false + } + } + }, + "required": [ + "sessions" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + } + } + } + }, + "/revoke/current": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "forgetBrowser": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/SessionsRevoked" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + } + } + } + }, + "/revoke/sessions": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "sessionIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "sessionIds" + ] + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/SessionsRevoked" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + } + } + } + }, + "/revoke/client": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/SessionsRevoked" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + } + } + } + } + }, + "components": { + "schemas": { + "errorResponse": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "note": { + "type": "string" + } + }, + "required": [ + "error" + ], + "additionalProperties": false + } + }, + "headers": { + "x-request-id": { + "required": true, + "description": "Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.", + "schema": { + "title": "Request ID", + "description": "Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.", + "type": "string" + } + } + }, + "responses": { + "SessionsRevoked": { + "description": "Session(s) were successfully revoked.", + "headers": { + "x-request-id": { + "$ref": "#/components/headers/x-request-id" + } + } + }, + "Unauthorized": { + "description": "Access token is missing or invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorResponse" + } + } + } + } + }, + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "JWT Authentication" + } + } + } +} \ No newline at end of file diff --git a/packages/oauth/router/openapitools.json b/packages/oauth/router/openapitools.json new file mode 100644 index 0000000..f052220 --- /dev/null +++ b/packages/oauth/router/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.17.0" + } +} diff --git a/packages/oauth/router/package.json b/packages/oauth/router/package.json new file mode 100644 index 0000000..7b828f6 --- /dev/null +++ b/packages/oauth/router/package.json @@ -0,0 +1,17 @@ +{ + "name": "@iracing-data/oauth-router", + "version": "0.0.1-alpha.0", + "description": "better-call based router for the iRacing OAuth API.", + "main": "dist/index.js", + "scripts": { + "build": "tsc --build tsconfig.build.json", + "codegen:client": "openapi-generator-cli generate -g typescript-fetch -i openapi/spec.json -o src/client --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case'" + }, + "dependencies": { + "@iracing-data/oauth-client": "workspace:*", + "better-call": "^1.0.26" + }, + "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.25.0" + } +} \ No newline at end of file diff --git a/packages/oauth/router/src/client/.openapi-generator-ignore b/packages/oauth/router/src/client/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/packages/oauth/router/src/client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/oauth/router/src/client/.openapi-generator/FILES b/packages/oauth/router/src/client/.openapi-generator/FILES new file mode 100644 index 0000000..f9b79f7 --- /dev/null +++ b/packages/oauth/router/src/client/.openapi-generator/FILES @@ -0,0 +1,15 @@ +.openapi-generator-ignore +apis/DefaultApi.ts +apis/index.ts +docs/DefaultApi.md +docs/ErrorResponse.md +docs/IracingProfileGet200Response.md +docs/SessionsGet200Response.md +docs/SessionsGet200ResponseSessionsInner.md +index.ts +models/ErrorResponse.ts +models/IracingProfileGet200Response.ts +models/SessionsGet200Response.ts +models/SessionsGet200ResponseSessionsInner.ts +models/index.ts +runtime.ts diff --git a/packages/oauth/router/src/client/.openapi-generator/VERSION b/packages/oauth/router/src/client/.openapi-generator/VERSION new file mode 100644 index 0000000..6328c54 --- /dev/null +++ b/packages/oauth/router/src/client/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0 diff --git a/packages/oauth/router/src/client/apis/DefaultApi.ts b/packages/oauth/router/src/client/apis/DefaultApi.ts new file mode 100644 index 0000000..070079f --- /dev/null +++ b/packages/oauth/router/src/client/apis/DefaultApi.ts @@ -0,0 +1,261 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing OAuth API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + IracingProfileGet200Response, + SessionsGet200Response, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingProfileGet200ResponseFromJSON, + IracingProfileGet200ResponseToJSON, + SessionsGet200ResponseFromJSON, + SessionsGet200ResponseToJSON, +} from '../models/index'; + +export interface RevokeCurrentPostRequest { + forget_browser?: boolean; +} + +export interface RevokeSessionsPostRequest { + session_ids: Array; +} + +/** + * + */ +export class DefaultApi extends runtime.BaseAPI { + + /** + */ + async iracingProfileGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/iracing/profile`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IracingProfileGet200ResponseFromJSON(jsonValue)); + } + + /** + */ + async iracingProfileGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.iracingProfileGetRaw(initOverrides); + return await response.value(); + } + + /** + */ + async revokeClientPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/revoke/client`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async revokeClientPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeClientPostRaw(initOverrides); + } + + /** + */ + async revokeCurrentPostRaw(requestParameters: RevokeCurrentPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['forget_browser'] != null) { + formParams.append('forgetBrowser', requestParameters['forget_browser'] as any); + } + + + let urlPath = `/revoke/current`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async revokeCurrentPost(requestParameters: RevokeCurrentPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeCurrentPostRaw(requestParameters, initOverrides); + } + + /** + */ + async revokeSessionsPostRaw(requestParameters: RevokeSessionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['session_ids'] == null) { + throw new runtime.RequiredError( + 'session_ids', + 'Required parameter "session_ids" was null or undefined when calling revokeSessionsPost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'application/x-www-form-urlencoded' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['session_ids'] != null) { + formParams.append('sessionIds', requestParameters['session_ids']!.join(runtime.COLLECTION_FORMATS["csv"])); + } + + + let urlPath = `/revoke/sessions`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async revokeSessionsPost(requestParameters: RevokeSessionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revokeSessionsPostRaw(requestParameters, initOverrides); + } + + /** + */ + async sessionsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/sessions`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SessionsGet200ResponseFromJSON(jsonValue)); + } + + /** + */ + async sessionsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionsGetRaw(initOverrides); + return await response.value(); + } + +} diff --git a/packages/oauth/router/src/client/apis/index.ts b/packages/oauth/router/src/client/apis/index.ts new file mode 100644 index 0000000..69c44c0 --- /dev/null +++ b/packages/oauth/router/src/client/apis/index.ts @@ -0,0 +1,3 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './DefaultApi'; diff --git a/packages/oauth/router/src/client/docs/DefaultApi.md b/packages/oauth/router/src/client/docs/DefaultApi.md new file mode 100644 index 0000000..5ebd7a3 --- /dev/null +++ b/packages/oauth/router/src/client/docs/DefaultApi.md @@ -0,0 +1,339 @@ +# DefaultApi + +All URIs are relative to *https://oauth.iracing.com/oauth2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**iracingProfileGet**](DefaultApi.md#iracingprofileget) | **GET** /iracing/profile | | +| [**revokeClientPost**](DefaultApi.md#revokeclientpost) | **POST** /revoke/client | | +| [**revokeCurrentPost**](DefaultApi.md#revokecurrentpost) | **POST** /revoke/current | | +| [**revokeSessionsPost**](DefaultApi.md#revokesessionspost) | **POST** /revoke/sessions | | +| [**sessionsGet**](DefaultApi.md#sessionsget) | **GET** /sessions | | + + + +## iracingProfileGet + +> IracingProfileGet200Response iracingProfileGet() + + + +### Example + +```ts +import { + Configuration, + DefaultApi, +} from ''; +import type { IracingProfileGetRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DefaultApi(config); + + try { + const data = await api.iracingProfileGet(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IracingProfileGet200Response**](IracingProfileGet200Response.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-request-id -
| +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## revokeClientPost + +> revokeClientPost() + + + +### Example + +```ts +import { + Configuration, + DefaultApi, +} from ''; +import type { RevokeClientPostRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DefaultApi(config); + + try { + const data = await api.revokeClientPost(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Session(s) were successfully revoked. | * x-request-id -
| +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## revokeCurrentPost + +> revokeCurrentPost(forget_browser) + + + +### Example + +```ts +import { + Configuration, + DefaultApi, +} from ''; +import type { RevokeCurrentPostRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DefaultApi(config); + + const body = { + // boolean (optional) + forget_browser: true, + } satisfies RevokeCurrentPostRequest; + + try { + const data = await api.revokeCurrentPost(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **forget_browser** | `boolean` | | [Optional] [Defaults to `undefined`] | + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Session(s) were successfully revoked. | * x-request-id -
| +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## revokeSessionsPost + +> revokeSessionsPost(session_ids) + + + +### Example + +```ts +import { + Configuration, + DefaultApi, +} from ''; +import type { RevokeSessionsPostRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DefaultApi(config); + + const body = { + // Array + session_ids: ..., + } satisfies RevokeSessionsPostRequest; + + try { + const data = await api.revokeSessionsPost(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **session_ids** | `Array` | | | + +### Return type + +`void` (Empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Session(s) were successfully revoked. | * x-request-id -
| +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sessionsGet + +> SessionsGet200Response sessionsGet() + + + +### Example + +```ts +import { + Configuration, + DefaultApi, +} from ''; +import type { SessionsGetRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new DefaultApi(config); + + try { + const data = await api.sessionsGet(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SessionsGet200Response**](SessionsGet200Response.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | * x-request-id -
| +| **401** | Access token is missing or invalid. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/packages/oauth/router/src/client/docs/ErrorResponse.md b/packages/oauth/router/src/client/docs/ErrorResponse.md new file mode 100644 index 0000000..5b45671 --- /dev/null +++ b/packages/oauth/router/src/client/docs/ErrorResponse.md @@ -0,0 +1,38 @@ + +# ErrorResponse + + +## Properties + +Name | Type +------------ | ------------- +`error` | string +`message` | string +`note` | string + +## Example + +```typescript +import type { ErrorResponse } from '' + +// TODO: Update the object below with actual values +const example = { + "error": null, + "message": null, + "note": null, +} satisfies ErrorResponse + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ErrorResponse +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/oauth/router/src/client/docs/IracingProfileGet200Response.md b/packages/oauth/router/src/client/docs/IracingProfileGet200Response.md new file mode 100644 index 0000000..1ffcd84 --- /dev/null +++ b/packages/oauth/router/src/client/docs/IracingProfileGet200Response.md @@ -0,0 +1,36 @@ + +# IracingProfileGet200Response + + +## Properties + +Name | Type +------------ | ------------- +`iracingName` | string +`iracingCustId` | number + +## Example + +```typescript +import type { IracingProfileGet200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "iracingName": null, + "iracingCustId": null, +} satisfies IracingProfileGet200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as IracingProfileGet200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/oauth/router/src/client/docs/SessionsGet200Response.md b/packages/oauth/router/src/client/docs/SessionsGet200Response.md new file mode 100644 index 0000000..6622c87 --- /dev/null +++ b/packages/oauth/router/src/client/docs/SessionsGet200Response.md @@ -0,0 +1,34 @@ + +# SessionsGet200Response + + +## Properties + +Name | Type +------------ | ------------- +`sessions` | [Array<SessionsGet200ResponseSessionsInner>](SessionsGet200ResponseSessionsInner.md) + +## Example + +```typescript +import type { SessionsGet200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "sessions": null, +} satisfies SessionsGet200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SessionsGet200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/oauth/router/src/client/docs/SessionsGet200ResponseSessionsInner.md b/packages/oauth/router/src/client/docs/SessionsGet200ResponseSessionsInner.md new file mode 100644 index 0000000..5519018 --- /dev/null +++ b/packages/oauth/router/src/client/docs/SessionsGet200ResponseSessionsInner.md @@ -0,0 +1,86 @@ + +# SessionsGet200ResponseSessionsInner + + +## Properties + +Name | Type +------------ | ------------- +`sessionId` | string +`clientId` | string +`clientName` | string +`clientDeveloperName` | string +`clientDeveloperUrl` | string +`clientDeveloperEmail` | string +`scope` | string +`scopeDescriptions` | string +`currentSession` | boolean +`impersonated` | boolean +`impersonationNote` | string +`firstIp` | string +`firstContinent` | string +`firstCountry` | string +`firstSubdivisions` | string +`firstCity` | string +`firstUserAgentHeader` | string +`firstUserAgentOperatingSystem` | string +`firstUserAgentBrowser` | string +`lastIp` | string +`lastContinent` | string +`lastCountry` | string +`lastSubdivisions` | string +`lastCity` | string +`lastUserAgentHeader` | string +`lastUserAgentOperatingSystem` | string +`lastUserAgentBrowser` | string + +## Example + +```typescript +import type { SessionsGet200ResponseSessionsInner } from '' + +// TODO: Update the object below with actual values +const example = { + "sessionId": null, + "clientId": null, + "clientName": null, + "clientDeveloperName": null, + "clientDeveloperUrl": null, + "clientDeveloperEmail": null, + "scope": null, + "scopeDescriptions": null, + "currentSession": null, + "impersonated": null, + "impersonationNote": null, + "firstIp": null, + "firstContinent": null, + "firstCountry": null, + "firstSubdivisions": null, + "firstCity": null, + "firstUserAgentHeader": null, + "firstUserAgentOperatingSystem": null, + "firstUserAgentBrowser": null, + "lastIp": null, + "lastContinent": null, + "lastCountry": null, + "lastSubdivisions": null, + "lastCity": null, + "lastUserAgentHeader": null, + "lastUserAgentOperatingSystem": null, + "lastUserAgentBrowser": null, +} satisfies SessionsGet200ResponseSessionsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SessionsGet200ResponseSessionsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/packages/oauth/router/src/client/index.ts b/packages/oauth/router/src/client/index.ts new file mode 100644 index 0000000..bebe8bb --- /dev/null +++ b/packages/oauth/router/src/client/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/packages/oauth/router/src/client/models/ErrorResponse.ts b/packages/oauth/router/src/client/models/ErrorResponse.ts new file mode 100644 index 0000000..8e05e35 --- /dev/null +++ b/packages/oauth/router/src/client/models/ErrorResponse.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing OAuth API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ErrorResponse + */ +export interface ErrorResponse { + /** + * + * @type {string} + * @memberof ErrorResponse + */ + error: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + note?: string; +} + +/** + * Check if a given object implements the ErrorResponse interface. + */ +export function instanceOfErrorResponse(value: object): value is ErrorResponse { + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function ErrorResponseFromJSON(json: any): ErrorResponse { + return ErrorResponseFromJSONTyped(json, false); +} + +export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse { + if (json == null) { + return json; + } + return { + + 'error': json['error'], + 'message': json['message'] == null ? undefined : json['message'], + 'note': json['note'] == null ? undefined : json['note'], + }; +} + +export function ErrorResponseToJSON(json: any): ErrorResponse { + return ErrorResponseToJSONTyped(json, false); +} + +export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': value['error'], + 'message': value['message'], + 'note': value['note'], + }; +} + diff --git a/packages/oauth/router/src/client/models/IracingProfileGet200Response.ts b/packages/oauth/router/src/client/models/IracingProfileGet200Response.ts new file mode 100644 index 0000000..c181660 --- /dev/null +++ b/packages/oauth/router/src/client/models/IracingProfileGet200Response.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing OAuth API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface IracingProfileGet200Response + */ +export interface IracingProfileGet200Response { + /** + * + * @type {string} + * @memberof IracingProfileGet200Response + */ + iracingName: string; + /** + * + * @type {number} + * @memberof IracingProfileGet200Response + */ + iracingCustId: number; +} + +/** + * Check if a given object implements the IracingProfileGet200Response interface. + */ +export function instanceOfIracingProfileGet200Response(value: object): value is IracingProfileGet200Response { + if (!('iracingName' in value) || value['iracingName'] === undefined) return false; + if (!('iracingCustId' in value) || value['iracingCustId'] === undefined) return false; + return true; +} + +export function IracingProfileGet200ResponseFromJSON(json: any): IracingProfileGet200Response { + return IracingProfileGet200ResponseFromJSONTyped(json, false); +} + +export function IracingProfileGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingProfileGet200Response { + if (json == null) { + return json; + } + return { + + 'iracingName': json['iracing_name'], + 'iracingCustId': json['iracing_cust_id'], + }; +} + +export function IracingProfileGet200ResponseToJSON(json: any): IracingProfileGet200Response { + return IracingProfileGet200ResponseToJSONTyped(json, false); +} + +export function IracingProfileGet200ResponseToJSONTyped(value?: IracingProfileGet200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'iracing_name': value['iracingName'], + 'iracing_cust_id': value['iracingCustId'], + }; +} + diff --git a/packages/oauth/router/src/client/models/SessionsGet200Response.ts b/packages/oauth/router/src/client/models/SessionsGet200Response.ts new file mode 100644 index 0000000..de64b5b --- /dev/null +++ b/packages/oauth/router/src/client/models/SessionsGet200Response.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing OAuth API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SessionsGet200ResponseSessionsInner } from './SessionsGet200ResponseSessionsInner'; +import { + SessionsGet200ResponseSessionsInnerFromJSON, + SessionsGet200ResponseSessionsInnerFromJSONTyped, + SessionsGet200ResponseSessionsInnerToJSON, + SessionsGet200ResponseSessionsInnerToJSONTyped, +} from './SessionsGet200ResponseSessionsInner'; + +/** + * + * @export + * @interface SessionsGet200Response + */ +export interface SessionsGet200Response { + /** + * + * @type {Array} + * @memberof SessionsGet200Response + */ + sessions: Array; +} + +/** + * Check if a given object implements the SessionsGet200Response interface. + */ +export function instanceOfSessionsGet200Response(value: object): value is SessionsGet200Response { + if (!('sessions' in value) || value['sessions'] === undefined) return false; + return true; +} + +export function SessionsGet200ResponseFromJSON(json: any): SessionsGet200Response { + return SessionsGet200ResponseFromJSONTyped(json, false); +} + +export function SessionsGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SessionsGet200Response { + if (json == null) { + return json; + } + return { + + 'sessions': ((json['sessions'] as Array).map(SessionsGet200ResponseSessionsInnerFromJSON)), + }; +} + +export function SessionsGet200ResponseToJSON(json: any): SessionsGet200Response { + return SessionsGet200ResponseToJSONTyped(json, false); +} + +export function SessionsGet200ResponseToJSONTyped(value?: SessionsGet200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'sessions': ((value['sessions'] as Array).map(SessionsGet200ResponseSessionsInnerToJSON)), + }; +} + diff --git a/packages/oauth/router/src/client/models/SessionsGet200ResponseSessionsInner.ts b/packages/oauth/router/src/client/models/SessionsGet200ResponseSessionsInner.ts new file mode 100644 index 0000000..276079c --- /dev/null +++ b/packages/oauth/router/src/client/models/SessionsGet200ResponseSessionsInner.ts @@ -0,0 +1,300 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing OAuth API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SessionsGet200ResponseSessionsInner + */ +export interface SessionsGet200ResponseSessionsInner { + /** + * A session identifier. This value is considered opaque and its format may change without warning at our discretion. + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + sessionId: string; + /** + * A client identifier. + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + clientId: string; + /** + * The name of the client as selected during client registration. + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + clientName: string; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + clientDeveloperName: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + clientDeveloperUrl: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + clientDeveloperEmail: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + scope: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + scopeDescriptions: string | null; + /** + * + * @type {boolean} + * @memberof SessionsGet200ResponseSessionsInner + */ + currentSession: boolean; + /** + * + * @type {boolean} + * @memberof SessionsGet200ResponseSessionsInner + */ + impersonated: boolean; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + impersonationNote: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstIp: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstContinent: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstCountry: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstSubdivisions: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstCity: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstUserAgentHeader: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstUserAgentOperatingSystem: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + firstUserAgentBrowser: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastIp: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastContinent: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastCountry: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastSubdivisions: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastCity: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastUserAgentHeader: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastUserAgentOperatingSystem: string | null; + /** + * + * @type {string} + * @memberof SessionsGet200ResponseSessionsInner + */ + lastUserAgentBrowser: string | null; +} + +/** + * Check if a given object implements the SessionsGet200ResponseSessionsInner interface. + */ +export function instanceOfSessionsGet200ResponseSessionsInner(value: object): value is SessionsGet200ResponseSessionsInner { + if (!('sessionId' in value) || value['sessionId'] === undefined) return false; + if (!('clientId' in value) || value['clientId'] === undefined) return false; + if (!('clientName' in value) || value['clientName'] === undefined) return false; + if (!('clientDeveloperName' in value) || value['clientDeveloperName'] === undefined) return false; + if (!('clientDeveloperUrl' in value) || value['clientDeveloperUrl'] === undefined) return false; + if (!('clientDeveloperEmail' in value) || value['clientDeveloperEmail'] === undefined) return false; + if (!('scope' in value) || value['scope'] === undefined) return false; + if (!('scopeDescriptions' in value) || value['scopeDescriptions'] === undefined) return false; + if (!('currentSession' in value) || value['currentSession'] === undefined) return false; + if (!('impersonated' in value) || value['impersonated'] === undefined) return false; + if (!('impersonationNote' in value) || value['impersonationNote'] === undefined) return false; + if (!('firstIp' in value) || value['firstIp'] === undefined) return false; + if (!('firstContinent' in value) || value['firstContinent'] === undefined) return false; + if (!('firstCountry' in value) || value['firstCountry'] === undefined) return false; + if (!('firstSubdivisions' in value) || value['firstSubdivisions'] === undefined) return false; + if (!('firstCity' in value) || value['firstCity'] === undefined) return false; + if (!('firstUserAgentHeader' in value) || value['firstUserAgentHeader'] === undefined) return false; + if (!('firstUserAgentOperatingSystem' in value) || value['firstUserAgentOperatingSystem'] === undefined) return false; + if (!('firstUserAgentBrowser' in value) || value['firstUserAgentBrowser'] === undefined) return false; + if (!('lastIp' in value) || value['lastIp'] === undefined) return false; + if (!('lastContinent' in value) || value['lastContinent'] === undefined) return false; + if (!('lastCountry' in value) || value['lastCountry'] === undefined) return false; + if (!('lastSubdivisions' in value) || value['lastSubdivisions'] === undefined) return false; + if (!('lastCity' in value) || value['lastCity'] === undefined) return false; + if (!('lastUserAgentHeader' in value) || value['lastUserAgentHeader'] === undefined) return false; + if (!('lastUserAgentOperatingSystem' in value) || value['lastUserAgentOperatingSystem'] === undefined) return false; + if (!('lastUserAgentBrowser' in value) || value['lastUserAgentBrowser'] === undefined) return false; + return true; +} + +export function SessionsGet200ResponseSessionsInnerFromJSON(json: any): SessionsGet200ResponseSessionsInner { + return SessionsGet200ResponseSessionsInnerFromJSONTyped(json, false); +} + +export function SessionsGet200ResponseSessionsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SessionsGet200ResponseSessionsInner { + if (json == null) { + return json; + } + return { + + 'sessionId': json['session_id'], + 'clientId': json['client_id'], + 'clientName': json['client_name'], + 'clientDeveloperName': json['client_developer_name'], + 'clientDeveloperUrl': json['client_developer_url'], + 'clientDeveloperEmail': json['client_developer_email'], + 'scope': json['scope'], + 'scopeDescriptions': json['scope_descriptions'], + 'currentSession': json['current_session'], + 'impersonated': json['impersonated'], + 'impersonationNote': json['impersonation_note'], + 'firstIp': json['first_ip'], + 'firstContinent': json['first_continent'], + 'firstCountry': json['first_country'], + 'firstSubdivisions': json['first_subdivisions'], + 'firstCity': json['first_city'], + 'firstUserAgentHeader': json['first_user_agent_header'], + 'firstUserAgentOperatingSystem': json['first_user_agent_operating_system'], + 'firstUserAgentBrowser': json['first_user_agent_browser'], + 'lastIp': json['last_ip'], + 'lastContinent': json['last_continent'], + 'lastCountry': json['last_country'], + 'lastSubdivisions': json['last_subdivisions'], + 'lastCity': json['last_city'], + 'lastUserAgentHeader': json['last_user_agent_header'], + 'lastUserAgentOperatingSystem': json['last_user_agent_operating_system'], + 'lastUserAgentBrowser': json['last_user_agent_browser'], + }; +} + +export function SessionsGet200ResponseSessionsInnerToJSON(json: any): SessionsGet200ResponseSessionsInner { + return SessionsGet200ResponseSessionsInnerToJSONTyped(json, false); +} + +export function SessionsGet200ResponseSessionsInnerToJSONTyped(value?: SessionsGet200ResponseSessionsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'session_id': value['sessionId'], + 'client_id': value['clientId'], + 'client_name': value['clientName'], + 'client_developer_name': value['clientDeveloperName'], + 'client_developer_url': value['clientDeveloperUrl'], + 'client_developer_email': value['clientDeveloperEmail'], + 'scope': value['scope'], + 'scope_descriptions': value['scopeDescriptions'], + 'current_session': value['currentSession'], + 'impersonated': value['impersonated'], + 'impersonation_note': value['impersonationNote'], + 'first_ip': value['firstIp'], + 'first_continent': value['firstContinent'], + 'first_country': value['firstCountry'], + 'first_subdivisions': value['firstSubdivisions'], + 'first_city': value['firstCity'], + 'first_user_agent_header': value['firstUserAgentHeader'], + 'first_user_agent_operating_system': value['firstUserAgentOperatingSystem'], + 'first_user_agent_browser': value['firstUserAgentBrowser'], + 'last_ip': value['lastIp'], + 'last_continent': value['lastContinent'], + 'last_country': value['lastCountry'], + 'last_subdivisions': value['lastSubdivisions'], + 'last_city': value['lastCity'], + 'last_user_agent_header': value['lastUserAgentHeader'], + 'last_user_agent_operating_system': value['lastUserAgentOperatingSystem'], + 'last_user_agent_browser': value['lastUserAgentBrowser'], + }; +} + diff --git a/packages/oauth/router/src/client/models/index.ts b/packages/oauth/router/src/client/models/index.ts new file mode 100644 index 0000000..728f58d --- /dev/null +++ b/packages/oauth/router/src/client/models/index.ts @@ -0,0 +1,6 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './ErrorResponse'; +export * from './IracingProfileGet200Response'; +export * from './SessionsGet200Response'; +export * from './SessionsGet200ResponseSessionsInner'; diff --git a/packages/oauth/router/src/client/runtime.ts b/packages/oauth/router/src/client/runtime.ts new file mode 100644 index 0000000..7729199 --- /dev/null +++ b/packages/oauth/router/src/client/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * iRacing OAuth API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "https://oauth.iracing.com/oauth2".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/packages/oauth/router/src/index.ts b/packages/oauth/router/src/index.ts new file mode 100644 index 0000000..12f2e30 --- /dev/null +++ b/packages/oauth/router/src/index.ts @@ -0,0 +1,166 @@ +import { + OAuthClientOptions, + IRacingOAuthTokenResponse, + OAuthClient, +} from "@iracing-data/oauth-client"; +import { + createEndpoint as createEndpointFn, + createRouter as createRouterFn, + EndpointContext, + RouterConfig, +} from "better-call"; +import { toNodeHandler } from "better-call/node"; +import { + createIRacingOAuthClientMiddleware, + iRacingSessionHeaderMiddleware, + oauthServiceClientMiddleware, +} from "./middleware"; + +type CallbackResponseContext = Pick< + EndpointContext, + | "setHeader" + | "setStatus" + | "getHeader" + | "getCookie" + | "getSignedCookie" + | "setCookie" + | "setSignedCookie" + | "redirect" + | "error" + | "request" +>; + +interface CreateRouterWithClientOptions { + oauthClient: OAuthClient; +} + +interface CreateRouterWithClientOptionsOptions { + oauthConfig: OAuthClientOptions; +} + +export interface CreateRouterOptions + extends RouterConfig, + Partial, + Partial { + /** The path at which to mount the callback. This should match the redirect_uri path registered with iRacing. */ + callbackPath: string; + /** Called when a token is received from the iRacing OAuth service. */ + onCallback: ( + session: IRacingOAuthTokenResponse, + context: CallbackResponseContext + ) => void; + /** Called when a session is successfully invalidated. */ + onSignOut: (token: string, context: CallbackResponseContext) => void; +} + +export function createRouter({ + oauthConfig, + oauthClient, + callbackPath = "/oauth/iracing/callback", + onCallback, + onSignOut, + ...options +}: CreateRouterOptions) { + const oauthMiddleware = createIRacingOAuthClientMiddleware({ + oauthClient, + clientOptions: oauthConfig, + }); + + const createEndpoint = createEndpointFn.create({ + use: [oauthMiddleware], + }); + + return createRouterFn( + { + signIn: createEndpoint( + "/signin", + { + method: "GET", + }, + async ({ context: { oauth }, redirect }) => { + const { url } = await oauth.authorize(); + return redirect(url.toString()); + } + ), + signOut: createEndpoint( + "/signout", + { + method: "GET", + requireHeaders: true, + requireRequest: true, + use: [iRacingSessionHeaderMiddleware, oauthServiceClientMiddleware], + }, + async ({ + context: { oauthService, iracingSession }, + request, + getHeader, + getCookie, + getSignedCookie, + setHeader, + setStatus, + setCookie, + setSignedCookie, + redirect, + error, + }) => { + await oauthService.revokeCurrentPost(); + + if (iracingSession) { + onSignOut(iracingSession, { + request, + getHeader, + getCookie, + getSignedCookie, + setHeader, + setStatus, + setCookie, + setSignedCookie, + redirect, + error, + }); + } + } + ), + callback: createEndpoint( + callbackPath, + { + method: "GET", + requireRequest: true, + }, + async ({ + context: { oauth }, + query, + request, + getHeader, + getCookie, + getSignedCookie, + setHeader, + setStatus, + setCookie, + setSignedCookie, + redirect, + error, + }) => { + const session = await oauth.callback(new URLSearchParams(query)); + + onCallback(session, { + request, + getHeader, + getCookie, + getSignedCookie, + setHeader, + setStatus, + setCookie, + setSignedCookie, + redirect, + error, + }); + } + ), + }, + options + ); +} + +export { toNodeHandler }; +export default createRouter; diff --git a/packages/oauth/router/src/middleware.ts b/packages/oauth/router/src/middleware.ts new file mode 100644 index 0000000..09ac0bb --- /dev/null +++ b/packages/oauth/router/src/middleware.ts @@ -0,0 +1,61 @@ +import { OAuthClient, OAuthClientOptions } from "@iracing-data/oauth-client"; +import { createMiddleware } from "better-call"; +import { Configuration, DefaultApi } from "./client"; +import { assert } from "console"; + +interface CreateIRacingOAuthClientMiddlewareOptions { + oauthClient?: OAuthClient; + clientOptions?: OAuthClientOptions; +} + +export const createIRacingOAuthClientMiddleware = ( + options: CreateIRacingOAuthClientMiddlewareOptions +) => { + assert( + options.oauthClient || options.clientOptions, + "An OAuth client or options must be provided." + ); + + return createMiddleware(async () => { + return { + oauth: options.oauthClient || new OAuthClient(options.clientOptions!), + }; + }); +}; + +export const iRacingSessionHeaderMiddleware = createMiddleware( + { + requireHeaders: true, + metadata: { + openapi: { + parameters: [ + { + in: "header", + name: "X-IRACING-ACCESS-TOKEN", + schema: { + type: "string", + }, + required: true, + description: "The JWT token to sign the request with.", + }, + ], + }, + }, + }, + async ({ getHeader }) => ({ + iracingSession: getHeader("X-IRACING-ACCESS-TOKEN"), + }) +); + +export const oauthServiceClientMiddleware = createMiddleware( + { + use: [iRacingSessionHeaderMiddleware], + }, + async ({ context: { iracingSession } }) => ({ + oauthService: new DefaultApi( + new Configuration({ + accessToken: iracingSession || undefined, + }) + ), + }) +); diff --git a/packages/oauth/router/tsconfig.build.json b/packages/oauth/router/tsconfig.build.json new file mode 100644 index 0000000..4f8d6cf --- /dev/null +++ b/packages/oauth/router/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "../../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "noUnusedLocals": false, + "module": "nodenext", + "moduleResolution": "nodenext", + "lib": ["es6", "dom"] + }, + "exclude": ["node_modules", "dist", "scripts"] +} diff --git a/packages/oauth/router/tsconfig.json b/packages/oauth/router/tsconfig.json new file mode 100644 index 0000000..5455dae --- /dev/null +++ b/packages/oauth/router/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": [], + "references": [{ "path": "./tsconfig.build.json" }], + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/packages/oauth/schema/package.json b/packages/oauth/schema/package.json new file mode 100644 index 0000000..fdcbe2e --- /dev/null +++ b/packages/oauth/schema/package.json @@ -0,0 +1,12 @@ +{ + "name": "@iracing-data/oauth-schema", + "version": "0.0.1-alpha.0", + "description": "Zod schema for iRacing OAuth API.", + "main": "dist/index.js", + "scripts": { + "build": "tsc --build tsconfig.build.json" + }, + "dependencies": { + "zod": "^4.1.12" + } +} \ No newline at end of file diff --git a/packages/oauth/schema/src/index.ts b/packages/oauth/schema/src/index.ts new file mode 100644 index 0000000..686fbd9 --- /dev/null +++ b/packages/oauth/schema/src/index.ts @@ -0,0 +1 @@ +export * from "./schema"; diff --git a/packages/oauth/schema/src/schema.ts b/packages/oauth/schema/src/schema.ts new file mode 100644 index 0000000..b89a568 --- /dev/null +++ b/packages/oauth/schema/src/schema.ts @@ -0,0 +1,292 @@ +import { z } from "zod"; + +/** + * OAuth2 schema + */ + +// Primitives + +export const IRacingOAuthClientIdSchema = z.string().meta({ + description: "The client identifier issued during client registration.", +}); + +export const IRacingOAuthClientSecretSchema = z.string().meta({ + description: "The client secret issued during registration.", +}); + +export const IRacingOAuthScopeAuthSchema = z.literal("iracing.auth").meta({ + description: "OAuth scope that grants authorization for iRacing services.", +}); + +export const IRacingOAuthScopeProfileSchema = z + .literal("iracing.profile") + .meta({ + description: "OAuth scope that grants access to the iRacing profile.", + }); + +export const IRacingOAuthScopesSchema = z.union([ + IRacingOAuthScopeAuthSchema, + IRacingOAuthScopeProfileSchema, +]); + +export const IRacingOAuthScopesStringSchema = z.string().optional().meta({ + description: + "One or more scopes to request, if any, separated by whitespace.", +}); + +// Headers + +export const IRacingOAuthRequestIdHeaderKey = "x-request-id"; +export const IRacingOAuthRequestIdHeaderSchema = z.string().meta({ + title: "Request ID", + description: + "Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.", + header: { + id: IRacingOAuthRequestIdHeaderKey, + }, +}); + +export const IRacingOAuthHeadersSchema = z.object({ + [IRacingOAuthRequestIdHeaderKey]: IRacingOAuthRequestIdHeaderSchema, +}); + +// Requests and responses + +export const IRacingOAuthErrorResponseSchema = z.object({ + status: z.number(), + status_reason: z.string(), + error: z.string(), + error_description: z.string(), + error_uri: z.string(), + state: z.string().optional(), +}); + +export const IRacingOAuthAuthorizeParametersSchema = z.object({ + client_id: IRacingOAuthClientIdSchema, + redirect_uri: z.url().meta({ + description: + "A redirect URI registered to the client, which must match exactly.", + }), + response_type: z.literal("code").meta({ + description: "The only valid value for this is code.", + }), + code_challenge: z.string().optional().meta({ + description: + "A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless.", + }), + code_challenge_method: z + .union([z.literal("plain"), z.literal("S256")]) + .default("plain") + .optional() + .meta({ + description: + "The PKCE code challenge method. Either S256 (recommended) or plain.", + }), + state: z.string().optional().meta({ + description: + "This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks.", + }), + scope: IRacingOAuthScopesStringSchema.optional(), + prompt: z.string().optional().meta({ + description: + "Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user.", + }), +}); + +export const IRacingOAuthCllbackParametersSchema = z + .object({ + state: z.string(), + code: z.string(), + }) + .meta({ + description: + "Parameters are added to the query string of the `redirect_uri`.", + }); + +export const IRacingOAuthTokenAuthorizationCodeGrantParametersSchema = z + .object({ + grant_type: z.literal("authorization_code"), + client_id: IRacingOAuthClientIdSchema, + client_secret: IRacingOAuthClientSecretSchema.optional(), + code: z + .string() + .meta({ description: "As returned to the redirect_uri of the client." }), + redirect_uri: z.string().meta({ + description: "The same redirect_uri used to `/authorize`.", + }), + code_verifier: z.string().optional().meta({ + description: + "The PKCE code verifier which is only required if a code_challenge was used to `/authorize``.", + }), + }) + .meta({ + id: "authorizationCodeGrant", + }); + +export const IRacingOAuthTokenRefreshGrantParametersSchema = z + .object({ + grant_type: z.literal("refresh_token"), + client_id: IRacingOAuthClientIdSchema, + client_secret: IRacingOAuthClientSecretSchema.optional(), + refresh_token: z.string().meta({ + description: "As returned in the `/token` response.", + }), + }) + .meta({ + id: "refreshTokenGrant", + }); + +export const IRacingOAuthPasswordLimitedGrantParametersSchema = z + .object({ + grant_type: z.literal("password_limited"), + client_id: IRacingOAuthClientIdSchema, + client_secret: IRacingOAuthClientSecretSchema, + username: z.string().meta({ + description: "The email address or other issued identifier for a user.", + }), + password: z.string().meta({ + description: + "The password of the user. Password must be masked with the `username` before it is sent to the server.", + }), + scope: IRacingOAuthScopesStringSchema.optional(), + }) + .meta({ + id: "passwordLimitedGrant", + }); + +export const IRacingOAuthTokenParametersSchema = z + .discriminatedUnion("grant_type", [ + IRacingOAuthTokenAuthorizationCodeGrantParametersSchema, + IRacingOAuthTokenRefreshGrantParametersSchema, + IRacingOAuthPasswordLimitedGrantParametersSchema, + ]) + .meta({ + id: "tokenGrantParameters", + }); + +export const IRacingOAuthTokenResponseSchema = z + .object({ + access_token: z.string().meta({ + description: + "The access token may be used to authorize a connection to a resource server. The value is considered opaque and its format may change without warning at our discretion.", + }), + token_type: z.literal("bearer"), + expires_in: z.number().meta({ + description: + "The number of seconds after which this access token will no longer be considered valid.", + }), + refresh_token: z.string().optional().meta({ + description: + "The refresh token may be used in a Refresh Token Grant to obtain new access and refresh tokens. Each refresh token may only be used once. The value is considered opaque and its format may change without warning at our discretion.", + }), + refresh_token_expires_in: z.number().optional().meta({ + description: + "The number of seconds after which this refresh token will no longer be considered valid. The server may not issue a refresh token, in which case this field will be omitted.", + }), + scope: IRacingOAuthScopesStringSchema.optional(), + }) + .meta({ + id: "tokenGrantResponse", + }); + +export const IRacingOAuthSessionSchema = z.object({ + session_id: z.string().meta({ + description: + "A session identifier. This value is considered opaque and its format may change without warning at our discretion.", + }), + client_id: z.string().meta({ + description: "A client identifier.", + }), + client_name: z.string().meta({ + description: + "The name of the client as selected during client registration.", + }), + client_developer_name: z.string().nullable(), + client_developer_url: z.string().nullable(), + client_developer_email: z.string().nullable(), + scope: z.string().nullable(), + scope_descriptions: z.string().nullable(), + // auth_time: + // last_activity: + // session_expiration + current_session: z.boolean(), + impersonated: z.boolean(), + impersonation_note: z.string().nullable(), + first_ip: z.ipv4().nullable(), + first_continent: z.string().nullable(), + first_country: z.string().nullable(), + first_subdivisions: z.string().nullable(), + first_city: z.string().nullable(), + first_user_agent_header: z.string().nullable(), + first_user_agent_operating_system: z.string().nullable(), + first_user_agent_browser: z.string().nullable(), + last_ip: z.ipv4().nullable(), + last_continent: z.string().nullable(), + last_country: z.string().nullable(), + last_subdivisions: z.string().nullable(), + last_city: z.string().nullable(), + last_user_agent_header: z.string().nullable(), + last_user_agent_operating_system: z.string().nullable(), + last_user_agent_browser: z.string().nullable(), +}); + +export const IRacingOAuthSessionsSchema = z.object({ + sessions: z.array(IRacingOAuthSessionSchema), +}); + +export const IRacingOAuthProfileResponseSchema = z.object({ + iracing_name: z.string(), + iracing_cust_id: z.number(), +}); + +export const IRacingOAuthRevokeCurrentSessionInputSchema = z.object({ + forgetBrowser: z.boolean().optional(), +}); + +export const IRacingOAuthRevokeSessionsInputSchema = z.object({ + sessionIds: z.array(z.string()), +}); + +// Types +export type IRacingOAuthClientId = z.infer; +export type IRacingOAuthClientSecret = z.infer< + typeof IRacingOAuthClientSecretSchema +>; +export type IRacingOAuthScopeAuth = z.infer; +export type IRacingOAuthScopeProfile = z.infer< + typeof IRacingOAuthScopeProfileSchema +>; +export type IRacingOAuthScopes = z.infer; +export type IRacingOAuthScopesString = z.infer< + typeof IRacingOAuthScopesStringSchema +>; +export type IRacingOAuthRequestIdHeader = z.infer< + typeof IRacingOAuthRequestIdHeaderSchema +>; +export type IRacingOAuthHeaders = z.infer; +export type IRacingOAuthAuthorizeParameters = z.infer< + typeof IRacingOAuthAuthorizeParametersSchema +>; +export type IRacingOAuthTokenAuthorizationCodeGrantParameters = z.infer< + typeof IRacingOAuthTokenAuthorizationCodeGrantParametersSchema +>; +export type IRacingOAuthTokenRefreshGrantParameters = z.infer< + typeof IRacingOAuthTokenRefreshGrantParametersSchema +>; +export type IRacingOAuthTokenParameters = z.infer< + typeof IRacingOAuthTokenParametersSchema +>; +export type IRacingOAuthTokenResponse = z.infer< + typeof IRacingOAuthTokenResponseSchema +>; +export type IRacingOAuthSession = z.infer; +export type IRacingOAuthSessions = z.infer; +export type IRacingOAuthProfileResponse = z.infer< + typeof IRacingOAuthProfileResponseSchema +>; +export type IRacingOAuthRevokeCurrentSessionParameters = z.infer< + typeof IRacingOAuthRevokeCurrentSessionInputSchema +>; +export type IRacingOAuthRevokeSessionsParameters = z.infer< + typeof IRacingOAuthRevokeSessionsInputSchema +>; diff --git a/packages/oauth/schema/tsconfig.build.json b/packages/oauth/schema/tsconfig.build.json new file mode 100644 index 0000000..f8efe39 --- /dev/null +++ b/packages/oauth/schema/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig/node.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "noUnusedLocals": true, + "module": "nodenext", + "moduleResolution": "nodenext" + }, + "exclude": ["node_modules", "dist", "scripts"] +} diff --git a/packages/oauth/schema/tsconfig.json b/packages/oauth/schema/tsconfig.json new file mode 100644 index 0000000..5455dae --- /dev/null +++ b/packages/oauth/schema/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": [], + "references": [{ "path": "./tsconfig.build.json" }], + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee558bf..09790ff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,6 +12,15 @@ importers: specifier: ^7.27.0 version: 7.27.0 devDependencies: + '@iracing-data/api-schema-to-openapi': + specifier: workspace:* + version: link:packages/helpers/api-schema-to-openapi + '@iracing-data/oauth-schema-to-openapi': + specifier: workspace:* + version: link:packages/helpers/oauth-schema-to-openapi + '@openapitools/openapi-generator-cli': + specifier: ^2.25.0 + version: 2.25.0(@types/node@24.3.1) '@types/google-protobuf': specifier: ^3.15.12 version: 3.15.12 @@ -30,6 +39,9 @@ importers: dotenv: specifier: 16.4.7 version: 16.4.7 + esbuild: + specifier: ^0.27.0 + version: 0.27.0 eslint: specifier: ^9 version: 9.34.0 @@ -61,64 +73,159 @@ importers: specifier: ^5.9.2 version: 5.9.2 - examples/iracing-api-proxy: + apps/race-events: dependencies: - '@iracing-data/api': + '@iracing-data/car-session-flag-events': specifier: workspace:* - version: link:../../packages/api - express: - specifier: ^5.1.0 - version: 5.1.0 + version: link:../../packages/events/car-session-flag-events + '@iracing-data/car-track-location-events': + specifier: workspace:* + version: link:../../packages/events/car-track-location-events + '@iracing-data/grpc-node': + specifier: workspace:* + version: link:../../packages/iracing-telemetry-grpc-node + '@iracing-data/pace-flag-events': + specifier: workspace:* + version: link:../../packages/events/pace-flag-events + '@iracing-data/pace-order-events': + specifier: workspace:* + version: link:../../packages/events/pace-order-events + '@iracing-data/pit-lane-events': + specifier: workspace:* + version: link:../../packages/events/pit-lane-events + '@iracing-data/session-flag-events': + specifier: workspace:* + version: link:../../packages/events/session-flag-events + '@iracing-data/session-state-events': + specifier: workspace:* + version: link:../../packages/events/session-state-events + '@iracing-data/telemetry-types': + specifier: workspace:* + version: link:../../packages/iracing-telemetry-types + ascii-table3: + specifier: ^1.0.1 + version: 1.0.1 + lodash: + specifier: ^4.17.21 + version: 4.17.21 + luxon: + specifier: ^3.7.1 + version: 3.7.2 + pino: + specifier: ^9.9.4 + version: 9.9.4 + pino-pretty: + specifier: ^13.1.1 + version: 13.1.1 devDependencies: - '@types/express': - specifier: ^5.0.3 - version: 5.0.3 + '@types/luxon': + specifier: ^3.7.1 + version: 3.7.1 + esbuild: + specifier: ^0.25.9 + version: 0.25.9 tsx: - specifier: ^4.19.0 + specifier: ^4.20.5 version: 4.20.5 typescript: specifier: ^5.9.2 version: 5.9.2 - examples/kapps-hello-world: + apps/sync-car-assets-cli: dependencies: - '@iracing-data/ws': + '@iracing-data/api-client-fetch': specifier: workspace:* - version: link:../../packages/iracing-telemetry-ws + version: link:../../packages/api/client/fetch + '@iracing-data/sync-car-assets': + specifier: workspace:* + version: link:../../packages/helpers/sync-car-assets + commander: + specifier: ^14.0.2 + version: 14.0.2 + openapi-fetch: + specifier: ^0.15.0 + version: 0.15.0 + devDependencies: + '@commander-js/extra-typings': + specifier: ^14.0.0 + version: 14.0.0(commander@14.0.2) + esbuild: + specifier: ^0.27.0 + version: 0.27.0 + openapi-typescript: + specifier: 7.10.1 + version: 7.10.1(typescript@5.9.2) + + apps/sync-track-assets-cli: + dependencies: + '@iracing-data/api-client-fetch': + specifier: workspace:* + version: link:../../packages/api/client/fetch + '@iracing-data/sync-track-assets': + specifier: workspace:* + version: link:../../packages/helpers/sync-track-assets + commander: + specifier: ^14.0.2 + version: 14.0.2 + openapi-fetch: + specifier: ^0.15.0 + version: 0.15.0 + devDependencies: + '@commander-js/extra-typings': + specifier: ^14.0.0 + version: 14.0.0(commander@14.0.2) + esbuild: + specifier: ^0.27.0 + version: 0.27.0 + openapi-typescript: + specifier: 7.10.1 + version: 7.10.1(typescript@5.9.2) - examples/oauth-example: + examples/iracing-proxy-api-example: dependencies: - '@iracing-data/api': + '@iracing-data/api-router': specifier: workspace:* - version: link:../../packages/api + version: link:../../packages/api/router '@iracing-data/oauth-client': specifier: workspace:* version: link:../../packages/oauth/client - axios: - specifier: ^1.7.9 - version: 1.8.2 + '@iracing-data/oauth-router': + specifier: workspace:* + version: link:../../packages/oauth/router better-call: specifier: ^1.0.24 - version: 1.0.24 + version: 1.0.26 cookie-parser: specifier: ^1.4.7 version: 1.4.7 express: specifier: ^5.1.0 version: 5.1.0 + express-jwt: + specifier: ^8.5.1 + version: 8.5.1 + jwt-decode: + specifier: ^4.0.0 + version: 4.0.0 zod: specifier: ^4.0.17 - version: 4.0.17 + version: 4.1.12 devDependencies: '@types/express': - specifier: ^5.0.3 - version: 5.0.3 + specifier: ^5.0.5 + version: 5.0.5 '@types/node': specifier: ^24.10.0 version: 24.10.0 tsx: specifier: ^4.19.0 - version: 4.20.4 + version: 4.20.5 + + examples/kapps-hello-world: + dependencies: + '@iracing-data/ws': + specifier: workspace:* + version: link:../../packages/iracing-telemetry-ws examples/player-pit-stop-events: dependencies: @@ -242,49 +349,46 @@ importers: specifier: workspace:* version: link:../../packages/iracing-telemetry-grpc-node - packages/api: + packages/api/client/axios: dependencies: axios: - specifier: ^1.7.9 - version: 1.8.2 - axios-cookiejar-support: - specifier: ^6.0.4 - version: 6.0.4(axios@1.8.2)(tough-cookie@5.1.1) - tough-cookie: - specifier: ^5.1.1 - version: 5.1.1 + specifier: ^1.6.1 + version: 1.13.2 + devDependencies: + '@types/node': + specifier: 12.11.5 - 12.20.42 + version: 12.20.42 + typescript: + specifier: ^4.0 || ^5.0 + version: 5.9.2 - packages/cli: - dependencies: - '@iracing-data/api': - specifier: workspace:* - version: link:../api - '@iracing-data/sync-car-assets': - specifier: workspace:* - version: link:../helpers/sync-car-assets - '@iracing-data/sync-track-assets': - specifier: workspace:* - version: link:../helpers/sync-track-assets - commander: - specifier: 13.1.0 - version: 13.1.0 - inquirer: - specifier: ^12.4.1 - version: 12.4.2(@types/node@24.3.1) - lodash: - specifier: ^4.17.21 - version: 4.17.21 - tough-cookie: - specifier: ^5.1.1 - version: 5.1.1 + packages/api/client/fetch: devDependencies: - '@commander-js/extra-typings': - specifier: ^13.1.0 - version: 13.1.0(commander@13.1.0) typescript: - specifier: ^5.9.2 + specifier: ^4.0 || ^5.0 version: 5.9.2 + packages/api/router: + dependencies: + '@iracing-data/api-client-fetch': + specifier: workspace:* + version: link:../client/fetch + '@iracing-data/api-schema': + specifier: workspace:* + version: link:../schema + better-call: + specifier: ^1.0.26 + version: 1.0.26 + + packages/api/schema: + dependencies: + zod: + specifier: ^4.1.12 + version: 4.1.12 + zod-openapi: + specifier: ^5.4.3 + version: 5.4.3(zod@4.1.12) + packages/events/car-session-flag-events: dependencies: '@iracing-data/telemetry-types': @@ -386,6 +490,25 @@ importers: specifier: ^5.9.2 version: 5.9.2 + packages/helpers/api-schema-to-openapi: + dependencies: + '@iracing-data/api-schema': + specifier: workspace:* + version: link:../../api/schema + commander: + specifier: ^14.0.2 + version: 14.0.2 + zod: + specifier: ^4.1.12 + version: 4.1.12 + zod-openapi: + specifier: ^5.4.3 + version: 5.4.3(zod@4.1.12) + devDependencies: + '@commander-js/extra-typings': + specifier: ^14.0.0 + version: 14.0.0(commander@14.0.2) + packages/helpers/iracing-json-schema-to-typescript: dependencies: commander: @@ -399,27 +522,36 @@ importers: specifier: ^13.1.0 version: 13.1.0(commander@14.0.0) - packages/helpers/sync-car-assets: + packages/helpers/oauth-schema-to-openapi: dependencies: - '@commander-js/extra-typings': - specifier: ^13.1.0 - version: 13.1.0(commander@14.0.0) - '@iracing-data/api': + '@iracing-data/api-schema': + specifier: workspace:* + version: link:../../api/schema + '@iracing-data/oauth-schema': specifier: workspace:* - version: link:../../api + version: link:../../oauth/schema commander: - specifier: ^14.0.0 - version: 14.0.0 - dotenv: - specifier: 16.4.7 - version: 16.4.7 + specifier: ^14.0.2 + version: 14.0.2 + zod: + specifier: ^4.1.12 + version: 4.1.12 + zod-openapi: + specifier: ^5.4.3 + version: 5.4.3(zod@4.1.12) devDependencies: - esbuild: - specifier: ^0.25.9 - version: 0.25.9 - inquirer: - specifier: ^12.9.4 - version: 12.9.4(@types/node@24.3.1) + '@commander-js/extra-typings': + specifier: ^14.0.0 + version: 14.0.0(commander@14.0.2) + + packages/helpers/sync-car-assets: + dependencies: + '@iracing-data/api-client-fetch': + specifier: workspace:* + version: link:../../api/client/fetch + '@iracing-data/api-schema': + specifier: workspace:* + version: link:../../api/schema packages/helpers/sync-telemetry-json-schema: dependencies: @@ -436,22 +568,12 @@ importers: packages/helpers/sync-track-assets: dependencies: - '@iracing-data/api': + '@iracing-data/api-client-fetch': specifier: workspace:* - version: link:../../api - commander: - specifier: ^14.0.0 - version: 14.0.0 - dotenv: - specifier: 16.4.7 - version: 16.4.7 - inquirer: - specifier: ^12.4.1 - version: 12.4.2(@types/node@24.3.1) - devDependencies: - '@commander-js/extra-typings': - specifier: ^13.1.0 - version: 13.1.0(commander@14.0.0) + version: link:../../api/client/fetch + '@iracing-data/api-schema': + specifier: workspace:* + version: link:../../api/schema packages/iracing-telemetry-grpc-node: dependencies: @@ -546,12 +668,34 @@ importers: packages/oauth/client: dependencies: + '@iracing-data/oauth-schema': + specifier: workspace:* + version: link:../schema oauth4webapi: specifier: ^3.7.0 version: 3.7.0 zod: - specifier: ^4.0.17 - version: 4.0.17 + specifier: ^4.1.12 + version: 4.1.12 + + packages/oauth/router: + dependencies: + '@iracing-data/oauth-client': + specifier: workspace:* + version: link:../client + better-call: + specifier: ^1.0.26 + version: 1.0.26 + devDependencies: + '@openapitools/openapi-generator-cli': + specifier: ^2.25.0 + version: 2.25.0(@types/node@24.3.1) + + packages/oauth/schema: + dependencies: + zod: + specifier: ^4.1.12 + version: 4.1.12 packages: @@ -564,6 +708,20 @@ packages: js-yaml: 4.1.0 dev: false + /@babel/code-frame@7.27.1: + resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.28.5 + js-tokens: 4.0.0 + picocolors: 1.1.1 + dev: true + + /@babel/helper-validator-identifier@7.28.5: + resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/runtime@7.27.0: resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==} engines: {node: '>=6.9.0'} @@ -579,12 +737,8 @@ packages: resolution: {integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA==} dev: false - /@commander-js/extra-typings@13.1.0(commander@13.1.0): - resolution: {integrity: sha512-q5P52BYb1hwVWE6dtID7VvuJWrlfbCv4klj7BjUUOqMz4jbSZD4C9fJ9lRjL2jnBGTg+gDDlaXN51rkWcLk4fg==} - peerDependencies: - commander: ~13.1.0 - dependencies: - commander: 13.1.0 + /@borewit/text-codec@0.1.1: + resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==} dev: true /@commander-js/extra-typings@13.1.0(commander@14.0.0): @@ -593,6 +747,15 @@ packages: commander: ~13.1.0 dependencies: commander: 14.0.0 + dev: true + + /@commander-js/extra-typings@14.0.0(commander@14.0.2): + resolution: {integrity: sha512-hIn0ncNaJRLkZrxBIp5AsW/eXEHNKYQBh0aPdoUqNgD+Io3NIykQqpKFyKcuasZhicGaEZJX/JBSIkZ4e5x8Dg==} + peerDependencies: + commander: ~14.0.0 + dependencies: + commander: 14.0.2 + dev: true /@cspotcode/source-map-support@0.8.1: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -610,6 +773,15 @@ packages: dev: true optional: true + /@esbuild/aix-ppc64@0.27.0: + resolution: {integrity: sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.25.9: resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==} engines: {node: '>=18'} @@ -619,6 +791,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.27.0: + resolution: {integrity: sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.25.9: resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==} engines: {node: '>=18'} @@ -628,6 +809,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.27.0: + resolution: {integrity: sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.25.9: resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==} engines: {node: '>=18'} @@ -637,6 +827,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.27.0: + resolution: {integrity: sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.25.9: resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==} engines: {node: '>=18'} @@ -646,6 +845,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.27.0: + resolution: {integrity: sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.25.9: resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==} engines: {node: '>=18'} @@ -655,6 +863,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.27.0: + resolution: {integrity: sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.25.9: resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==} engines: {node: '>=18'} @@ -664,6 +881,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.27.0: + resolution: {integrity: sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.25.9: resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==} engines: {node: '>=18'} @@ -673,6 +899,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.27.0: + resolution: {integrity: sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.25.9: resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==} engines: {node: '>=18'} @@ -682,6 +917,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.27.0: + resolution: {integrity: sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.25.9: resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==} engines: {node: '>=18'} @@ -691,6 +935,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.27.0: + resolution: {integrity: sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.25.9: resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==} engines: {node: '>=18'} @@ -700,10 +953,28 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.25.9: - resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} + /@esbuild/linux-ia32@0.27.0: + resolution: {integrity: sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==} engines: {node: '>=18'} - cpu: [loong64] + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.25.9: + resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.27.0: + resolution: {integrity: sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==} + engines: {node: '>=18'} + cpu: [loong64] os: [linux] requiresBuild: true dev: true @@ -718,6 +989,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.27.0: + resolution: {integrity: sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.25.9: resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==} engines: {node: '>=18'} @@ -727,6 +1007,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.27.0: + resolution: {integrity: sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.25.9: resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==} engines: {node: '>=18'} @@ -736,6 +1025,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.27.0: + resolution: {integrity: sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.25.9: resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==} engines: {node: '>=18'} @@ -745,6 +1043,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.27.0: + resolution: {integrity: sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.25.9: resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==} engines: {node: '>=18'} @@ -754,6 +1061,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.27.0: + resolution: {integrity: sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-arm64@0.25.9: resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==} engines: {node: '>=18'} @@ -763,6 +1079,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-arm64@0.27.0: + resolution: {integrity: sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.25.9: resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==} engines: {node: '>=18'} @@ -772,6 +1097,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.27.0: + resolution: {integrity: sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-arm64@0.25.9: resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==} engines: {node: '>=18'} @@ -781,6 +1115,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-arm64@0.27.0: + resolution: {integrity: sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.25.9: resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==} engines: {node: '>=18'} @@ -790,6 +1133,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.27.0: + resolution: {integrity: sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openharmony-arm64@0.25.9: resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} engines: {node: '>=18'} @@ -799,6 +1151,15 @@ packages: dev: true optional: true + /@esbuild/openharmony-arm64@0.27.0: + resolution: {integrity: sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.25.9: resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==} engines: {node: '>=18'} @@ -808,6 +1169,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.27.0: + resolution: {integrity: sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.25.9: resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==} engines: {node: '>=18'} @@ -817,6 +1187,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.27.0: + resolution: {integrity: sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.25.9: resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==} engines: {node: '>=18'} @@ -826,6 +1205,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.27.0: + resolution: {integrity: sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.25.9: resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==} engines: {node: '>=18'} @@ -835,6 +1223,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.27.0: + resolution: {integrity: sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.7.0(eslint@9.34.0): resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -962,8 +1359,8 @@ packages: engines: {node: '>=18.18'} dev: true - /@inquirer/checkbox@4.1.2(@types/node@24.3.1): - resolution: {integrity: sha512-PL9ixC5YsPXzXhAZFUPmkXGxfgjkdfZdPEPPmt4kFwQ4LBMDG9n/nHXYRGGZSKZJs+d1sGKWgS2GiPzVRKUdtQ==} + /@inquirer/external-editor@1.0.3(@types/node@24.3.1): + resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -971,456 +1368,129 @@ packages: '@types/node': optional: true dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@24.3.1) '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - dev: false - - /@inquirer/checkbox@4.2.2(@types/node@24.3.1): - resolution: {integrity: sha512-E+KExNurKcUJJdxmjglTl141EwxWyAHplvsYJQgSwXf8qiNWkTxTuCCqmhFEmbIXd4zLaGMfQFJ6WrZ7fSeV3g==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - dev: true - - /@inquirer/confirm@5.1.16(@types/node@24.3.1): - resolution: {integrity: sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - dev: true - - /@inquirer/confirm@5.1.6(@types/node@24.3.1): - resolution: {integrity: sha512-6ZXYK3M1XmaVBZX6FCfChgtponnL0R6I7k8Nu+kaoNkT828FVZTcca1MqmWQipaW2oNREQl5AaPCUOOCVNdRMw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - dev: false - - /@inquirer/core@10.1.7(@types/node@24.3.1): - resolution: {integrity: sha512-AA9CQhlrt6ZgiSy6qoAigiA1izOa751ugX6ioSjqgJ+/Gd+tEN/TORk5sUYNjXuHWfW0r1n/a6ak4u/NqHHrtA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - cli-width: 4.1.0 - mute-stream: 2.0.0 - signal-exit: 4.1.0 - wrap-ansi: 6.2.0 - yoctocolors-cjs: 2.1.2 - dev: false - - /@inquirer/core@10.2.0(@types/node@24.3.1): - resolution: {integrity: sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - cli-width: 4.1.0 - mute-stream: 2.0.0 - signal-exit: 4.1.0 - wrap-ansi: 6.2.0 - yoctocolors-cjs: 2.1.2 + chardet: 2.1.1 + iconv-lite: 0.7.0 dev: true - /@inquirer/editor@4.2.18(@types/node@24.3.1): - resolution: {integrity: sha512-yeQN3AXjCm7+Hmq5L6Dm2wEDeBRdAZuyZ4I7tWSSanbxDzqM0KqzoDbKM7p4ebllAYdoQuPJS6N71/3L281i6w==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/external-editor': 1.0.1(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 + /@isaacs/balanced-match@4.0.1: + resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} + engines: {node: 20 || >=22} dev: true - /@inquirer/editor@4.2.7(@types/node@24.3.1): - resolution: {integrity: sha512-gktCSQtnSZHaBytkJKMKEuswSk2cDBuXX5rxGFv306mwHfBPjg5UAldw9zWGoEyvA9KpRDkeM4jfrx0rXn0GyA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + /@isaacs/brace-expansion@5.0.0: + resolution: {integrity: sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==} + engines: {node: 20 || >=22} dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - external-editor: 3.1.0 - dev: false - - /@inquirer/expand@4.0.18(@types/node@24.3.1): - resolution: {integrity: sha512-xUjteYtavH7HwDMzq4Cn2X4Qsh5NozoDHCJTdoXg9HfZ4w3R6mxV1B9tL7DGJX2eq/zqtsFjhm0/RJIMGlh3ag==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - yoctocolors-cjs: 2.1.2 + '@isaacs/balanced-match': 4.0.1 dev: true - /@inquirer/expand@4.0.9(@types/node@24.3.1): - resolution: {integrity: sha512-Xxt6nhomWTAmuSX61kVgglLjMEFGa+7+F6UUtdEUeg7fg4r9vaFttUUKrtkViYYrQBA5Ia1tkOJj2koP9BuLig==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - yoctocolors-cjs: 2.1.2 - dev: false - - /@inquirer/external-editor@1.0.1(@types/node@24.3.1): - resolution: {integrity: sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} dependencies: - '@types/node': 24.3.1 - chardet: 2.1.0 - iconv-lite: 0.6.3 - dev: true - - /@inquirer/figures@1.0.10: - resolution: {integrity: sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==} - engines: {node: '>=18'} - dev: false - - /@inquirer/figures@1.0.13: - resolution: {integrity: sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==} - engines: {node: '>=18'} + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.2 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 dev: true - /@inquirer/input@4.1.6(@types/node@24.3.1): - resolution: {integrity: sha512-1f5AIsZuVjPT4ecA8AwaxDFNHny/tSershP/cTvTDxLdiIGTeILNcKozB0LaYt6mojJLUbOYhpIxicaYf7UKIQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - dev: false - - /@inquirer/input@4.2.2(@types/node@24.3.1): - resolution: {integrity: sha512-hqOvBZj/MhQCpHUuD3MVq18SSoDNHy7wEnQ8mtvs71K8OPZVXJinOzcvQna33dNYLYE4LkA9BlhAhK6MJcsVbw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 + /@jridgewell/resolve-uri@3.1.2: + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} dev: true - /@inquirer/number@3.0.18(@types/node@24.3.1): - resolution: {integrity: sha512-7exgBm52WXZRczsydCVftozFTrrwbG5ySE0GqUd2zLNSBXyIucs2Wnm7ZKLe/aUu6NUg9dg7Q80QIHCdZJiY4A==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 + /@jridgewell/sourcemap-codec@1.5.5: + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} dev: true - /@inquirer/number@3.0.9(@types/node@24.3.1): - resolution: {integrity: sha512-iN2xZvH3tyIYXLXBvlVh0npk1q/aVuKXZo5hj+K3W3D4ngAEq/DkLpofRzx6oebTUhBvOgryZ+rMV0yImKnG3w==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - dev: false - - /@inquirer/password@4.0.18(@types/node@24.3.1): - resolution: {integrity: sha512-zXvzAGxPQTNk/SbT3carAD4Iqi6A2JS2qtcqQjsL22uvD+JfQzUrDEtPjLL7PLn8zlSNyPdY02IiQjzoL9TStA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 dev: true - /@inquirer/password@4.0.9(@types/node@24.3.1): - resolution: {integrity: sha512-xBEoOw1XKb0rIN208YU7wM7oJEHhIYkfG7LpTJAEW913GZeaoQerzf5U/LSHI45EVvjAdgNXmXgH51cUXKZcJQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - dev: false + /@js-sdsl/ordered-map@4.4.2: + resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} - /@inquirer/prompts@7.3.2(@types/node@24.3.1): - resolution: {integrity: sha512-G1ytyOoHh5BphmEBxSwALin3n1KGNYB6yImbICcRQdzXfOGbuJ9Jske/Of5Sebk339NSGGNfUshnzK8YWkTPsQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/checkbox': 4.1.2(@types/node@24.3.1) - '@inquirer/confirm': 5.1.6(@types/node@24.3.1) - '@inquirer/editor': 4.2.7(@types/node@24.3.1) - '@inquirer/expand': 4.0.9(@types/node@24.3.1) - '@inquirer/input': 4.1.6(@types/node@24.3.1) - '@inquirer/number': 3.0.9(@types/node@24.3.1) - '@inquirer/password': 4.0.9(@types/node@24.3.1) - '@inquirer/rawlist': 4.0.9(@types/node@24.3.1) - '@inquirer/search': 3.0.9(@types/node@24.3.1) - '@inquirer/select': 4.0.9(@types/node@24.3.1) - '@types/node': 24.3.1 + /@jsdevtools/ono@7.1.3: + resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} dev: false - /@inquirer/prompts@7.8.4(@types/node@24.3.1): - resolution: {integrity: sha512-MuxVZ1en1g5oGamXV3DWP89GEkdD54alcfhHd7InUW5BifAdKQEK9SLFa/5hlWbvuhMPlobF0WAx7Okq988Jxg==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/checkbox': 4.2.2(@types/node@24.3.1) - '@inquirer/confirm': 5.1.16(@types/node@24.3.1) - '@inquirer/editor': 4.2.18(@types/node@24.3.1) - '@inquirer/expand': 4.0.18(@types/node@24.3.1) - '@inquirer/input': 4.2.2(@types/node@24.3.1) - '@inquirer/number': 3.0.18(@types/node@24.3.1) - '@inquirer/password': 4.0.18(@types/node@24.3.1) - '@inquirer/rawlist': 4.1.6(@types/node@24.3.1) - '@inquirer/search': 3.1.1(@types/node@24.3.1) - '@inquirer/select': 4.3.2(@types/node@24.3.1) - '@types/node': 24.3.1 + /@lukeed/csprng@1.1.0: + resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} + engines: {node: '>=8'} dev: true - /@inquirer/rawlist@4.0.9(@types/node@24.3.1): - resolution: {integrity: sha512-+5t6ebehKqgoxV8fXwE49HkSF2Rc9ijNiVGEQZwvbMI61/Q5RcD+jWD6Gs1tKdz5lkI8GRBL31iO0HjGK1bv+A==} - engines: {node: '>=18'} + /@nestjs/axios@4.0.1(@nestjs/common@11.1.6)(axios@1.12.2)(rxjs@7.8.2): + resolution: {integrity: sha512-68pFJgu+/AZbWkGu65Z3r55bTsCPlgyKaV4BSG8yUAD72q1PPuyVRgUwFv6BxdnibTUHlyxm06FmYWNC+bjN7A==} peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + '@nestjs/common': ^10.0.0 || ^11.0.0 + axios: ^1.3.1 + rxjs: ^7.0.0 dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - yoctocolors-cjs: 2.1.2 - dev: false - - /@inquirer/rawlist@4.1.6(@types/node@24.3.1): - resolution: {integrity: sha512-KOZqa3QNr3f0pMnufzL7K+nweFFCCBs6LCXZzXDrVGTyssjLeudn5ySktZYv1XiSqobyHRYYK0c6QsOxJEhXKA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - yoctocolors-cjs: 2.1.2 + '@nestjs/common': 11.1.6(reflect-metadata@0.2.2)(rxjs@7.8.2) + axios: 1.12.2 + rxjs: 7.8.2 dev: true - /@inquirer/search@3.0.9(@types/node@24.3.1): - resolution: {integrity: sha512-DWmKztkYo9CvldGBaRMr0ETUHgR86zE6sPDVOHsqz4ISe9o1LuiWfgJk+2r75acFclA93J/lqzhT0dTjCzHuoA==} - engines: {node: '>=18'} + /@nestjs/common@11.1.6(reflect-metadata@0.2.2)(rxjs@7.8.2): + resolution: {integrity: sha512-krKwLLcFmeuKDqngG2N/RuZHCs2ycsKcxWIDgcm7i1lf3sQ0iG03ci+DsP/r3FcT/eJDFsIHnKtNta2LIi7PzQ==} peerDependencies: - '@types/node': '>=18' + class-transformer: '>=0.4.1' + class-validator: '>=0.13.2' + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 peerDependenciesMeta: - '@types/node': + class-transformer: optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - yoctocolors-cjs: 2.1.2 - dev: false - - /@inquirer/search@3.1.1(@types/node@24.3.1): - resolution: {integrity: sha512-TkMUY+A2p2EYVY3GCTItYGvqT6LiLzHBnqsU1rJbrpXUijFfM6zvUx0R4civofVwFCmJZcKqOVwwWAjplKkhxA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': + class-validator: optional: true dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - yoctocolors-cjs: 2.1.2 + file-type: 21.0.0 + iterare: 1.2.1 + load-esm: 1.0.2 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + transitivePeerDependencies: + - supports-color dev: true - /@inquirer/select@4.0.9(@types/node@24.3.1): - resolution: {integrity: sha512-BpJyJe7Dkhv2kz7yG7bPSbJLQuu/rqyNlF1CfiiFeFwouegfH+zh13KDyt6+d9DwucKo7hqM3wKLLyJxZMO+Xg==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/figures': 1.0.10 - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - dev: false - - /@inquirer/select@4.3.2(@types/node@24.3.1): - resolution: {integrity: sha512-nwous24r31M+WyDEHV+qckXkepvihxhnyIaod2MG7eCE6G0Zm/HUF6jgN8GXgf4U7AU6SLseKdanY195cwvU6w==} - engines: {node: '>=18'} + /@nestjs/core@11.1.6(@nestjs/common@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.2): + resolution: {integrity: sha512-siWX7UDgErisW18VTeJA+x+/tpNZrJewjTBsRPF3JVxuWRuAB1kRoiJcxHgln8Lb5UY9NdvklITR84DUEXD0Cg==} + engines: {node: '>= 20'} + requiresBuild: true peerDependencies: - '@types/node': '>=18' + '@nestjs/common': ^11.0.0 + '@nestjs/microservices': ^11.0.0 + '@nestjs/platform-express': ^11.0.0 + '@nestjs/websockets': ^11.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 peerDependenciesMeta: - '@types/node': + '@nestjs/microservices': optional: true - dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - dev: true - - /@inquirer/type@3.0.4(@types/node@24.3.1): - resolution: {integrity: sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': + '@nestjs/platform-express': optional: true - dependencies: - '@types/node': 24.3.1 - dev: false - - /@inquirer/type@3.0.8(@types/node@24.3.1): - resolution: {integrity: sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': + '@nestjs/websockets': optional: true dependencies: - '@types/node': 24.3.1 - dev: true - - /@jridgewell/resolve-uri@3.1.2: - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec@1.5.5: - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - dev: true - - /@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.5 + '@nestjs/common': 11.1.6(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nuxt/opencollective': 0.4.1 + fast-safe-stringify: 2.1.1 + iterare: 1.2.1 + path-to-regexp: 8.2.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 dev: true - /@js-sdsl/ordered-map@4.4.2: - resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} - - /@jsdevtools/ono@7.1.3: - resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} - dev: false - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1442,6 +1512,61 @@ packages: fastq: 1.19.0 dev: true + /@nuxt/opencollective@0.4.1: + resolution: {integrity: sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==} + engines: {node: ^14.18.0 || >=16.10.0, npm: '>=5.10.0'} + hasBin: true + dependencies: + consola: 3.4.2 + dev: true + + /@nuxtjs/opencollective@0.3.2: + resolution: {integrity: sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + consola: 2.15.3 + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: true + + /@openapitools/openapi-generator-cli@2.25.0(@types/node@24.3.1): + resolution: {integrity: sha512-u/3VAbF8c68AXBgm8nBAdDPLPW/KgrtHz28yemf92zNB0iDZFGdRUX2W80Lzf177g6ctYLz0GIPHCOU0LTJegQ==} + engines: {node: '>=16'} + hasBin: true + requiresBuild: true + dependencies: + '@nestjs/axios': 4.0.1(@nestjs/common@11.1.6)(axios@1.12.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.6(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nuxtjs/opencollective': 0.3.2 + axios: 1.12.2 + chalk: 4.1.2 + commander: 8.3.0 + compare-versions: 6.1.1 + concurrently: 9.2.1 + console.table: 0.10.0 + fs-extra: 11.3.2 + glob: 11.0.3 + inquirer: 8.2.7(@types/node@24.3.1) + proxy-agent: 6.5.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + transitivePeerDependencies: + - '@nestjs/microservices' + - '@nestjs/platform-express' + - '@nestjs/websockets' + - '@types/node' + - class-transformer + - class-validator + - debug + - encoding + - supports-color + dev: true + /@pkgr/core@0.2.9: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -1480,6 +1605,36 @@ packages: /@protobufjs/utf8@1.1.0: resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + /@redocly/ajv@8.17.1: + resolution: {integrity: sha512-EDtsGZS964mf9zAUXAl9Ew16eYbeyAFWhsPr0fX6oaJxgd8rApYlPBf0joyhnUHz88WxrigyFtTaqqzXNzPgqw==} + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.0 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + dev: true + + /@redocly/config@0.22.2: + resolution: {integrity: sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==} + dev: true + + /@redocly/openapi-core@1.34.5(supports-color@10.2.2): + resolution: {integrity: sha512-0EbE8LRbkogtcCXU7liAyC00n9uNG9hJ+eMyHFdUsy9lB/WGqnEBgwjA9q2cyzAVcdTkQqTBBU1XePNnN3OijA==} + engines: {node: '>=18.17.0', npm: '>=9.5.0'} + dependencies: + '@redocly/ajv': 8.17.1 + '@redocly/config': 0.22.2 + colorette: 1.4.0 + https-proxy-agent: 7.0.6(supports-color@10.2.2) + js-levenshtein: 1.1.6 + js-yaml: 4.1.0 + minimatch: 5.1.6 + pluralize: 8.0.0 + yaml-ast-parser: 0.0.43 + transitivePeerDependencies: + - supports-color + dev: true + /@rtsao/scc@1.1.0: resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} dev: true @@ -1489,6 +1644,25 @@ packages: engines: {node: '>=4'} dev: true + /@tokenizer/inflate@0.2.7: + resolution: {integrity: sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==} + engines: {node: '>=18'} + dependencies: + debug: 4.4.3(supports-color@10.2.2) + fflate: 0.8.2 + token-types: 6.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@tokenizer/token@0.3.0: + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + dev: true + + /@tootallnate/quickjs-emscripten@0.23.0: + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + dev: true + /@tsconfig/node10@1.0.11: resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} dev: true @@ -1531,8 +1705,8 @@ packages: '@types/send': 0.17.5 dev: true - /@types/express@5.0.3: - resolution: {integrity: sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==} + /@types/express@5.0.5: + resolution: {integrity: sha512-LuIQOcb6UmnF7C1PCFmEU1u2hmiHL43fgFQX67sN3H4Z+0Yk0Neo++mFsBjhOAuLzvlQeqAAkeDOZrJs9rzumQ==} dependencies: '@types/body-parser': 1.19.6 '@types/express-serve-static-core': 5.0.7 @@ -1554,6 +1728,13 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/jsonwebtoken@9.0.10: + resolution: {integrity: sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==} + dependencies: + '@types/ms': 2.1.0 + '@types/node': 24.10.0 + dev: false + /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: @@ -1567,8 +1748,16 @@ packages: resolution: {integrity: sha512-H3iskjFIAn5SlJU7OuxUmTEpebK6TKB8rxZShDslBMZJ5u9S//KM1sbdAisiSrqwLQncVjnpi2OK2J51h+4lsg==} dev: true - /@types/mime@1.3.5: - resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + /@types/mime@1.3.5: + resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + dev: true + + /@types/ms@2.1.0: + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + dev: false + + /@types/node@12.20.42: + resolution: {integrity: sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw==} dev: true /@types/node@24.10.0: @@ -1580,6 +1769,7 @@ packages: resolution: {integrity: sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==} dependencies: undici-types: 7.10.0 + dev: true /@types/qs@6.14.0: resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==} @@ -1683,7 +1873,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 8.24.1(typescript@5.9.2) '@typescript-eslint/utils': 8.24.1(eslint@9.34.0)(typescript@5.9.2) - debug: 4.4.3 + debug: 4.4.3(supports-color@10.2.2) eslint: 9.34.0 ts-api-utils: 2.0.1(typescript@5.9.2) typescript: 5.9.2 @@ -1728,7 +1918,7 @@ packages: dependencies: '@typescript-eslint/types': 8.24.1 '@typescript-eslint/visitor-keys': 8.24.1 - debug: 4.4.3 + debug: 4.4.3(supports-color@10.2.2) fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 @@ -1810,7 +2000,7 @@ packages: /agent-base@7.1.4: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} - dev: false + dev: true /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -1821,22 +2011,38 @@ packages: uri-js: 4.4.1 dev: true + /ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: true + /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} dependencies: type-fest: 0.21.3 + dev: true /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + /ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} + dev: true + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 + /ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + dev: true + /archive-type@4.0.0: resolution: {integrity: sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA==} engines: {node: '>=4'} @@ -1926,6 +2132,13 @@ packages: printable-characters: 1.0.42 dev: false + /ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + dependencies: + tslib: 2.8.1 + dev: true + /async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} @@ -1933,7 +2146,6 @@ packages: /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: false /atomic-sleep@1.0.0: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} @@ -1947,18 +2159,24 @@ packages: possible-typed-array-names: 1.1.0 dev: true - /axios-cookiejar-support@6.0.4(axios@1.8.2)(tough-cookie@5.1.1): - resolution: {integrity: sha512-4Bzj+l63eGwnWDBFdJHeGS6Ij3ytpyqvo//ocsb5kCLN/rKthzk27Afh2iSkZtuudOBkHUWWIcyCb4GKhXqovQ==} - engines: {node: '>=20.0.0'} - peerDependencies: - axios: '>=0.20.0' - tough-cookie: '>=4.0.0' + /axios@1.12.2: + resolution: {integrity: sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==} + dependencies: + follow-redirects: 1.15.11 + form-data: 4.0.4 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: true + + /axios@1.13.2: + resolution: {integrity: sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==} dependencies: - axios: 1.8.2 - http-cookie-agent: 7.0.2(tough-cookie@5.1.1) - tough-cookie: 5.1.1 + follow-redirects: 1.15.11 + form-data: 4.0.4 + proxy-from-env: 1.1.0 transitivePeerDependencies: - - undici + - debug dev: false /axios@1.8.2: @@ -1979,14 +2197,18 @@ packages: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true - /better-call@1.0.24: - resolution: {integrity: sha512-iGqL29cstPp4xLD2MjKL1EmyAqQHjYS+cBMt4W27rPs3vf+kuqkVPA0NYaf7JciBOzVsJdNj4cbZWXC5TardWQ==} + /basic-ftp@5.0.5: + resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} + engines: {node: '>=10.0.0'} + dev: true + + /better-call@1.0.26: + resolution: {integrity: sha512-/5AaTPC8IRXV5yWxpAI7eR2RNiGHq4q/mjBm9DiikIkmJhzuqO1Ub66oYYqJ3eBFF+6BfdtZFRnuW0me8T0Emg==} dependencies: '@better-auth/utils': 0.3.0 '@better-fetch/fetch': 1.1.18 rou3: 0.5.1 set-cookie-parser: 2.7.2 - uncrypto: 0.1.3 dev: false /bl@1.2.3: @@ -1996,13 +2218,21 @@ packages: safe-buffer: 5.2.1 dev: true + /bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + /body-parser@2.2.0: resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} engines: {node: '>=18'} dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 4.4.0 + debug: 4.4.3(supports-color@10.2.2) http-errors: 2.0.0 iconv-lite: 0.6.3 on-finished: 2.4.1 @@ -2048,6 +2278,10 @@ packages: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true + /buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + dev: false + /buffer-fill@1.0.0: resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} dev: true @@ -2113,17 +2347,30 @@ packages: supports-color: 7.2.0 dev: true - /chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - dev: false + /change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} + dev: true - /chardet@2.1.0: - resolution: {integrity: sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==} + /chardet@2.1.1: + resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} dev: true - /cli-width@4.1.0: - resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} - engines: {node: '>= 12'} + /cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + dependencies: + restore-cursor: 3.1.0 + dev: true + + /cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + dev: true + + /cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + dev: true /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} @@ -2139,6 +2386,12 @@ packages: mimic-response: 1.0.1 dev: true + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + requiresBuild: true + dev: true + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -2148,6 +2401,10 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + /colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + dev: true + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: false @@ -2157,24 +2414,61 @@ packages: engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 - dev: false - - /commander@13.1.0: - resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} - engines: {node: '>=18'} /commander@14.0.0: resolution: {integrity: sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==} engines: {node: '>=20'} + /commander@14.0.2: + resolution: {integrity: sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==} + engines: {node: '>=20'} + /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true + /commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + dev: true + + /compare-versions@6.1.1: + resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /concurrently@9.2.1: + resolution: {integrity: sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==} + engines: {node: '>=18'} + hasBin: true + dependencies: + chalk: 4.1.2 + rxjs: 7.8.2 + shell-quote: 1.8.3 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + dev: true + + /consola@2.15.3: + resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + dev: true + + /consola@3.4.2: + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} + engines: {node: ^14.18.0 || >=16.10.0} + dev: true + + /console.table@0.10.0: + resolution: {integrity: sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==} + engines: {node: '> 0.10'} + dependencies: + easy-table: 1.1.0 + dev: true + /content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -2233,6 +2527,11 @@ packages: which: 2.0.2 dev: true + /data-uri-to-buffer@6.0.2: + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} + dev: true + /data-view-buffer@1.0.2: resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} @@ -2285,6 +2584,7 @@ packages: optional: true dependencies: ms: 2.1.3 + dev: true /debug@4.4.1: resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} @@ -2296,8 +2596,9 @@ packages: optional: true dependencies: ms: 2.1.3 + dev: true - /debug@4.4.3: + /debug@4.4.3(supports-color@10.2.2): resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} peerDependencies: @@ -2307,7 +2608,7 @@ packages: optional: true dependencies: ms: 2.1.3 - dev: true + supports-color: 10.2.2 /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} @@ -2378,6 +2679,13 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + requiresBuild: true + dependencies: + clone: 1.0.4 + dev: true + /define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -2396,10 +2704,18 @@ packages: object-keys: 1.1.1 dev: true + /degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} + dependencies: + ast-types: 0.13.4 + escodegen: 2.1.0 + esprima: 4.0.1 + dev: true + /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - dev: false /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} @@ -2421,6 +2737,7 @@ packages: /dotenv@16.4.7: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} + dev: true /download@8.0.0: resolution: {integrity: sha512-ASRY5QhDk7FK+XrQtQyvhpDKanLluEEQtWl/J7Lxuf/b+i8RYh997QeXvL85xitrmRKVlx9c7eTrcRdq2GS4eA==} @@ -2451,6 +2768,22 @@ packages: resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} dev: true + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + + /easy-table@1.1.0: + resolution: {integrity: sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==} + optionalDependencies: + wcwidth: 1.0.1 + dev: true + + /ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + dependencies: + safe-buffer: 5.2.1 + dev: false + /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false @@ -2458,6 +2791,10 @@ packages: /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: true + /encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} @@ -2601,6 +2938,40 @@ packages: '@esbuild/win32-x64': 0.25.9 dev: true + /esbuild@0.27.0: + resolution: {integrity: sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==} + engines: {node: '>=18'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.0 + '@esbuild/android-arm': 0.27.0 + '@esbuild/android-arm64': 0.27.0 + '@esbuild/android-x64': 0.27.0 + '@esbuild/darwin-arm64': 0.27.0 + '@esbuild/darwin-x64': 0.27.0 + '@esbuild/freebsd-arm64': 0.27.0 + '@esbuild/freebsd-x64': 0.27.0 + '@esbuild/linux-arm': 0.27.0 + '@esbuild/linux-arm64': 0.27.0 + '@esbuild/linux-ia32': 0.27.0 + '@esbuild/linux-loong64': 0.27.0 + '@esbuild/linux-mips64el': 0.27.0 + '@esbuild/linux-ppc64': 0.27.0 + '@esbuild/linux-riscv64': 0.27.0 + '@esbuild/linux-s390x': 0.27.0 + '@esbuild/linux-x64': 0.27.0 + '@esbuild/netbsd-arm64': 0.27.0 + '@esbuild/netbsd-x64': 0.27.0 + '@esbuild/openbsd-arm64': 0.27.0 + '@esbuild/openbsd-x64': 0.27.0 + '@esbuild/openharmony-arm64': 0.27.0 + '@esbuild/sunos-x64': 0.27.0 + '@esbuild/win32-arm64': 0.27.0 + '@esbuild/win32-ia32': 0.27.0 + '@esbuild/win32-x64': 0.27.0 + dev: true + /escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -2619,6 +2990,18 @@ packages: engines: {node: '>=10'} dev: true + /escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + dev: true + /eslint-config-prettier@10.1.8(eslint@9.34.0): resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} hasBin: true @@ -2801,6 +3184,12 @@ packages: eslint-visitor-keys: 4.2.1 dev: true + /esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: true + /esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} @@ -2830,6 +3219,19 @@ packages: engines: {node: '>= 0.6'} dev: false + /express-jwt@8.5.1: + resolution: {integrity: sha512-Dv6QjDLpR2jmdb8M6XQXiCcpEom7mK8TOqnr0/TngDKsG2DHVkO8+XnVxkJVN7BuS1I3OrGw6N8j5DaaGgkDRQ==} + engines: {node: '>= 8.0.0'} + dependencies: + '@types/jsonwebtoken': 9.0.10 + express-unless: 2.1.3 + jsonwebtoken: 9.0.2 + dev: false + + /express-unless@2.1.3: + resolution: {integrity: sha512-wj4tLMyCVYuIIKHGt0FhCtIViBcwzWejX0EjNxveAa6dG+0XBCQhMbx+PnkLkFCxLC69qoFrxds4pIyL88inaQ==} + dev: false + /express@5.1.0: resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} engines: {node: '>= 18'} @@ -2840,7 +3242,7 @@ packages: content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.1 + debug: 4.4.3(supports-color@10.2.2) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -2880,15 +3282,6 @@ packages: sort-keys-length: 1.0.1 dev: true - /external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} - dependencies: - chardet: 0.7.0 - iconv-lite: 0.4.24 - tmp: 0.0.33 - dev: false - /fast-copy@3.0.2: resolution: {integrity: sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==} dev: false @@ -2927,7 +3320,10 @@ packages: /fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - dev: false + + /fast-uri@3.1.0: + resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} + dev: true /fastq@1.19.0: resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} @@ -2952,6 +3348,17 @@ packages: picomatch: 4.0.2 dev: false + /fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + dev: true + + /figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -2964,6 +3371,18 @@ packages: engines: {node: '>=6'} dev: true + /file-type@21.0.0: + resolution: {integrity: sha512-ek5xNX2YBYlXhiUXui3D/BXa3LdqPmoLJ7rqEx2bKJ7EAUEfmXgW0Das7Dc6Nr9MvqaOnIqiPV0mZk/r/UpNAg==} + engines: {node: '>=20'} + dependencies: + '@tokenizer/inflate': 0.2.7 + strtok3: 10.3.4 + token-types: 6.1.1 + uint8array-extras: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: true + /file-type@3.9.0: resolution: {integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==} engines: {node: '>=0.10.0'} @@ -3009,7 +3428,7 @@ packages: resolution: {integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==} engines: {node: '>= 0.8'} dependencies: - debug: 4.4.0 + debug: 4.4.3(supports-color@10.2.2) encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -3047,7 +3466,6 @@ packages: peerDependenciesMeta: debug: optional: true - dev: false /for-each@0.3.5: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} @@ -3056,6 +3474,14 @@ packages: is-callable: 1.2.7 dev: true + /foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + dev: true + /form-data@4.0.4: resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} engines: {node: '>= 6'} @@ -3065,7 +3491,6 @@ packages: es-set-tostringtag: 2.1.0 hasown: 2.0.2 mime-types: 2.1.35 - dev: false /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} @@ -3097,6 +3522,15 @@ packages: universalify: 2.0.1 dev: true + /fs-extra@11.3.2: + resolution: {integrity: sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -3185,6 +3619,17 @@ packages: resolve-pkg-maps: 1.0.0 dev: true + /get-uri@6.0.5: + resolution: {integrity: sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==} + engines: {node: '>= 14'} + dependencies: + basic-ftp: 5.0.5 + data-uri-to-buffer: 6.0.2 + debug: 4.4.3(supports-color@10.2.2) + transitivePeerDependencies: + - supports-color + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3199,6 +3644,19 @@ packages: is-glob: 4.0.3 dev: true + /glob@11.0.3: + resolution: {integrity: sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==} + engines: {node: 20 || >=22} + hasBin: true + dependencies: + foreground-child: 3.3.1 + jackspeak: 4.1.1 + minimatch: 10.1.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.1 + dev: true + /globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -3314,20 +3772,6 @@ packages: resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==} dev: true - /http-cookie-agent@7.0.2(tough-cookie@5.1.1): - resolution: {integrity: sha512-aHaES6SOFtnSlmWu0yEaaQvu+QexUG2gscSAvMhJ7auzW8r/jYOgGrzuAm9G9nHbksuhz7Lw4zOwDHmfQaxZvw==} - engines: {node: '>=20.0.0'} - peerDependencies: - tough-cookie: ^4.0.0 || ^5.0.0 - undici: ^7.0.0 - peerDependenciesMeta: - undici: - optional: true - dependencies: - agent-base: 7.1.4 - tough-cookie: 5.1.1 - dev: false - /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -3339,18 +3783,39 @@ packages: toidentifier: 1.0.1 dev: false - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + /http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@10.2.2) + transitivePeerDependencies: + - supports-color + dev: true + + /https-proxy-agent@7.0.6(supports-color@10.2.2): + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@10.2.2) + transitivePeerDependencies: + - supports-color + dev: true + + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 dev: false - /iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + /iconv-lite@0.7.0: + resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 + dev: true /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -3374,45 +3839,35 @@ packages: engines: {node: '>=0.8.19'} dev: true + /index-to-position@1.2.0: + resolution: {integrity: sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==} + engines: {node: '>=18'} + dev: true + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /inquirer@12.4.2(@types/node@24.3.1): - resolution: {integrity: sha512-reyjHcwyK2LObXgTJH4T1Dpfhwu88LNPTZmg/KenmTsy3T8lN/kZT8Oo7UwwkB9q8+ss2qjjN7GV8oFAfyz9Xg==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@inquirer/core': 10.1.7(@types/node@24.3.1) - '@inquirer/prompts': 7.3.2(@types/node@24.3.1) - '@inquirer/type': 3.0.4(@types/node@24.3.1) - '@types/node': 24.3.1 - ansi-escapes: 4.3.2 - mute-stream: 2.0.0 - run-async: 3.0.0 - rxjs: 7.8.1 - dev: false - - /inquirer@12.9.4(@types/node@24.3.1): - resolution: {integrity: sha512-5bV3LOgLtMAiJq1QpaUddfRrvaX59wiMYppS7z2jNRSQ64acI0yqx7WMxWhgymenSXOyD657g9tlsTjqGYM8sg==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + /inquirer@8.2.7(@types/node@24.3.1): + resolution: {integrity: sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==} + engines: {node: '>=12.0.0'} dependencies: - '@inquirer/core': 10.2.0(@types/node@24.3.1) - '@inquirer/prompts': 7.8.4(@types/node@24.3.1) - '@inquirer/type': 3.0.8(@types/node@24.3.1) - '@types/node': 24.3.1 + '@inquirer/external-editor': 1.0.3(@types/node@24.3.1) ansi-escapes: 4.3.2 - mute-stream: 2.0.0 - run-async: 4.0.6 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 rxjs: 7.8.2 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + transitivePeerDependencies: + - '@types/node' dev: true /internal-slot@1.1.0: @@ -3432,6 +3887,11 @@ packages: p-is-promise: 1.1.0 dev: true + /ip-address@10.1.0: + resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==} + engines: {node: '>= 12'} + dev: true + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -3532,6 +3992,11 @@ packages: dependencies: is-extglob: 2.1.1 + /is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + dev: true + /is-map@2.0.3: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} @@ -3628,6 +4093,11 @@ packages: which-typed-array: 1.1.19 dev: true + /is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + dev: true + /is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} @@ -3664,8 +4134,20 @@ packages: resolution: {integrity: sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==} engines: {node: '>= 4'} dependencies: - has-to-string-tag-x: 1.4.1 - is-object: 1.0.2 + has-to-string-tag-x: 1.4.1 + is-object: 1.0.2 + dev: true + + /iterare@1.2.1: + resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} + engines: {node: '>=6'} + dev: true + + /jackspeak@4.1.1: + resolution: {integrity: sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==} + engines: {node: 20 || >=22} + dependencies: + '@isaacs/cliui': 8.0.2 dev: true /joycon@3.1.1: @@ -3673,6 +4155,15 @@ packages: engines: {node: '>=10'} dev: false + /js-levenshtein@1.1.6: + resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} + engines: {node: '>=0.10.0'} + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -3707,6 +4198,10 @@ packages: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: true + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true @@ -3726,6 +4221,42 @@ packages: graceful-fs: 4.2.11 dev: true + /jsonwebtoken@9.0.2: + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} + engines: {node: '>=12', npm: '>=6'} + dependencies: + jws: 3.2.2 + lodash.includes: 4.3.0 + lodash.isboolean: 3.0.3 + lodash.isinteger: 4.0.4 + lodash.isnumber: 3.0.3 + lodash.isplainobject: 4.0.6 + lodash.isstring: 4.0.1 + lodash.once: 4.1.1 + ms: 2.1.3 + semver: 7.7.2 + dev: false + + /jwa@1.4.2: + resolution: {integrity: sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==} + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + dev: false + + /jws@3.2.2: + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} + dependencies: + jwa: 1.4.2 + safe-buffer: 5.2.1 + dev: false + + /jwt-decode@4.0.0: + resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} + engines: {node: '>=18'} + dev: false + /keyv@3.0.0: resolution: {integrity: sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==} dependencies: @@ -3746,6 +4277,11 @@ packages: type-check: 0.4.0 dev: true + /load-esm@1.0.2: + resolution: {integrity: sha512-nVAvWk/jeyrWyXEAs84mpQCYccxRqgKY4OznLuJhJCa0XsPSfdOIr2zvBZEj3IHEHbX97jjscKRRV539bW0Gpw==} + engines: {node: '>=13.2.0'} + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -3756,13 +4292,49 @@ packages: /lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + /lodash.includes@4.3.0: + resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} + dev: false + + /lodash.isboolean@3.0.3: + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} + dev: false + + /lodash.isinteger@4.0.4: + resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} + dev: false + + /lodash.isnumber@3.0.3: + resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} + dev: false + + /lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + dev: false + + /lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + dev: false + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.once@4.1.1: + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + dev: false + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + /log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + dev: true + /long@5.3.1: resolution: {integrity: sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==} @@ -3776,6 +4348,16 @@ packages: engines: {node: '>=0.10.0'} dev: true + /lru-cache@11.2.2: + resolution: {integrity: sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==} + engines: {node: 20 || >=22} + dev: true + + /lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + dev: true + /luxon@3.7.2: resolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==} engines: {node: '>=12'} @@ -3830,7 +4412,6 @@ packages: /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} - dev: false /mime-db@1.54.0: resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} @@ -3841,7 +4422,6 @@ packages: engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 - dev: false /mime-types@3.0.1: resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} @@ -3850,17 +4430,36 @@ packages: mime-db: 1.54.0 dev: false + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + /mimic-response@1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} dev: true + /minimatch@10.1.1: + resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==} + engines: {node: 20 || >=22} + dependencies: + '@isaacs/brace-expansion': 5.0.0 + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.12 dev: true + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.2 + dev: true + /minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -3871,12 +4470,17 @@ packages: /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + /minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - /mute-stream@2.0.0: - resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} - engines: {node: ^18.17.0 || >=20.5.0} + /mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + dev: true /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -3887,6 +4491,23 @@ packages: engines: {node: '>= 0.6'} dev: false + /netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + dev: true + + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + /normalize-url@2.0.1: resolution: {integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==} engines: {node: '>=4'} @@ -3972,6 +4593,38 @@ packages: dependencies: wrappy: 1.0.2 + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + + /openapi-fetch@0.15.0: + resolution: {integrity: sha512-OjQUdi61WO4HYhr9+byCPMj0+bgste/LtSBEcV6FzDdONTs7x0fWn8/ndoYwzqCsKWIxEZwo4FN/TG1c1rI8IQ==} + dependencies: + openapi-typescript-helpers: 0.0.15 + dev: false + + /openapi-typescript-helpers@0.0.15: + resolution: {integrity: sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==} + dev: false + + /openapi-typescript@7.10.1(typescript@5.9.2): + resolution: {integrity: sha512-rBcU8bjKGGZQT4K2ekSTY2Q5veOQbVG/lTKZ49DeCyT9z62hM2Vj/LLHjDHC9W7LJG8YMHcdXpRZDqC1ojB/lw==} + hasBin: true + peerDependencies: + typescript: ^5.x + dependencies: + '@redocly/openapi-core': 1.34.5(supports-color@10.2.2) + ansi-colors: 4.1.3 + change-case: 5.4.4 + parse-json: 8.3.0 + supports-color: 10.2.2 + typescript: 5.9.2 + yargs-parser: 21.1.1 + dev: true + /optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -3984,10 +4637,20 @@ packages: word-wrap: 1.2.5 dev: true - /os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - dev: false + /ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + dev: true /own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} @@ -4041,6 +4704,34 @@ packages: p-finally: 1.0.0 dev: true + /pac-proxy-agent@7.2.0: + resolution: {integrity: sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==} + engines: {node: '>= 14'} + dependencies: + '@tootallnate/quickjs-emscripten': 0.23.0 + agent-base: 7.1.4 + debug: 4.4.3(supports-color@10.2.2) + get-uri: 6.0.5 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6(supports-color@10.2.2) + pac-resolver: 7.0.1 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + dev: true + + /pac-resolver@7.0.1: + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} + dependencies: + degenerator: 5.0.1 + netmask: 2.0.2 + dev: true + + /package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + dev: true + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -4048,6 +4739,15 @@ packages: callsites: 3.1.0 dev: true + /parse-json@8.3.0: + resolution: {integrity: sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==} + engines: {node: '>=18'} + dependencies: + '@babel/code-frame': 7.27.1 + index-to-position: 1.2.0 + type-fest: 4.41.0 + dev: true + /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -4067,15 +4767,26 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true + /path-scurry@2.0.1: + resolution: {integrity: sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==} + engines: {node: 20 || >=22} + dependencies: + lru-cache: 11.2.2 + minipass: 7.1.2 + dev: true + /path-to-regexp@8.2.0: resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} engines: {node: '>=16'} - dev: false /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + dev: true + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -4159,6 +4870,11 @@ packages: thread-stream: 3.1.0 dev: false + /pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + /possible-typed-array-names@1.1.0: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} @@ -4246,9 +4962,24 @@ packages: ipaddr.js: 1.9.1 dev: false + /proxy-agent@6.5.0: + resolution: {integrity: sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@10.2.2) + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6(supports-color@10.2.2) + lru-cache: 7.18.3 + pac-proxy-agent: 7.2.0 + proxy-from-env: 1.1.0 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + dev: true + /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - dev: false /pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} @@ -4312,11 +5043,24 @@ packages: util-deprecate: 1.0.2 dev: true + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: true + /real-require@0.2.0: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} engines: {node: '>= 12.13.0'} dev: false + /reflect-metadata@0.2.2: + resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} + dev: true + /reflect.getprototypeof@1.0.10: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} @@ -4351,6 +5095,11 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: true + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -4376,6 +5125,14 @@ packages: lowercase-keys: 1.0.1 dev: true + /restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + dev: true + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -4389,7 +5146,7 @@ packages: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} dependencies: - debug: 4.4.0 + debug: 4.4.3(supports-color@10.2.2) depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -4398,13 +5155,8 @@ packages: - supports-color dev: false - /run-async@3.0.0: - resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} - engines: {node: '>=0.12.0'} - dev: false - - /run-async@4.0.6: - resolution: {integrity: sha512-IoDlSLTs3Yq593mb3ZoKWKXMNu3UpObxhgA/Xuid5p4bbfi2jdY1Hj0m1K+0/tEuQTxIGMhQDqGjKb7RuxGpAQ==} + /run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} dev: true @@ -4414,12 +5166,6 @@ packages: queue-microtask: 1.2.3 dev: true - /rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - dependencies: - tslib: 2.8.1 - dev: false - /rxjs@7.8.2: resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} dependencies: @@ -4494,13 +5240,12 @@ packages: resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} hasBin: true - dev: true /send@1.2.0: resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} engines: {node: '>= 18'} dependencies: - debug: 4.4.0 + debug: 4.4.3(supports-color@10.2.2) encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -4578,6 +5323,11 @@ packages: engines: {node: '>=8'} dev: true + /shell-quote@1.8.3: + resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==} + engines: {node: '>= 0.4'} + dev: true + /side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -4614,9 +5364,38 @@ packages: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + dev: true + + /smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + dev: true + + /socks-proxy-agent@8.0.5: + resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@10.2.2) + socks: 2.8.7 + transitivePeerDependencies: + - supports-color + dev: true + + /socks@2.8.7: + resolution: {integrity: sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + dependencies: + ip-address: 10.1.0 + smart-buffer: 4.2.0 + dev: true /sonic-boom@4.2.0: resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} @@ -4645,6 +5424,13 @@ packages: is-plain-obj: 1.1.0 dev: true + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + requiresBuild: true + dev: true + optional: true + /split2@4.2.0: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} engines: {node: '>= 10.x'} @@ -4676,6 +5462,15 @@ packages: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.2 + dev: true + /string.prototype.trim@1.2.10: resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} engines: {node: '>= 0.4'} @@ -4720,6 +5515,13 @@ packages: dependencies: ansi-regex: 5.0.1 + /strip-ansi@7.1.2: + resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.2.2 + dev: true + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -4748,6 +5550,17 @@ packages: escape-string-regexp: 1.0.5 dev: true + /strtok3@10.3.4: + resolution: {integrity: sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==} + engines: {node: '>=18'} + dependencies: + '@tokenizer/token': 0.3.0 + dev: true + + /supports-color@10.2.2: + resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} + engines: {node: '>=18'} + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -4755,6 +5568,13 @@ packages: has-flag: 4.0.0 dev: true + /supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + dependencies: + has-flag: 4.0.0 + dev: true + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -4803,24 +5623,6 @@ packages: picomatch: 4.0.2 dev: false - /tldts-core@6.1.77: - resolution: {integrity: sha512-bCaqm24FPk8OgBkM0u/SrEWJgHnhBWYqeBo6yUmcZJDCHt/IfyWBb+14CXdGi4RInMv4v7eUAin15W0DoA+Ytg==} - dev: false - - /tldts@6.1.77: - resolution: {integrity: sha512-lBpoWgy+kYmuXWQ83+R7LlJCnsd9YW8DGpZSHhrMl4b8Ly/1vzOie3OdtmUJDkKxcgRGOehDu5btKkty+JEe+g==} - hasBin: true - dependencies: - tldts-core: 6.1.77 - dev: false - - /tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} - dependencies: - os-tmpdir: 1.0.2 - dev: false - /to-buffer@1.1.1: resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} dev: true @@ -4837,12 +5639,23 @@ packages: engines: {node: '>=0.6'} dev: false - /tough-cookie@5.1.1: - resolution: {integrity: sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==} - engines: {node: '>=16'} + /token-types@6.1.1: + resolution: {integrity: sha512-kh9LVIWH5CnL63Ipf0jhlBIy0UsrMj/NJDfpsy1SqOXlLKEVyXXYrnFxFT1yOOYVGBSApeVnjPw/sBz5BfEjAQ==} + engines: {node: '>=14.16'} dependencies: - tldts: 6.1.77 - dev: false + '@borewit/text-codec': 0.1.1 + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + dev: true + + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: true + + /tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + dev: true /trim-repeated@1.0.0: resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} @@ -4910,6 +5723,7 @@ packages: /tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} requiresBuild: true + dev: true /tsx@4.20.4: resolution: {integrity: sha512-yyxBKfORQ7LuRt/BQKBXrpcq59ZvSW0XxwfjAt3w2/8PmdxaFzijtMhTawprSHhpzeM5BgU2hXHG3lklIERZXg==} @@ -4943,6 +5757,12 @@ packages: /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + dev: true + + /type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + dev: true /type-is@2.0.1: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} @@ -5004,6 +5824,18 @@ packages: hasBin: true dev: true + /uid@2.0.2: + resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} + engines: {node: '>=8'} + dependencies: + '@lukeed/csprng': 1.1.0 + dev: true + + /uint8array-extras@1.5.0: + resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} + engines: {node: '>=18'} + dev: true + /unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} @@ -5021,12 +5853,9 @@ packages: through: 2.3.8 dev: true - /uncrypto@0.1.3: - resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} - dev: false - /undici-types@7.10.0: resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==} + dev: true /undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -5072,6 +5901,23 @@ packages: engines: {node: '>= 0.8'} dev: false + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + dependencies: + defaults: 1.0.4 + dev: true + + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: true + + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: true + /which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -5145,6 +5991,7 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 + dev: true /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} @@ -5155,6 +6002,15 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.1.2 + dev: true + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -5180,6 +6036,10 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} + /yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + dev: true + /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -5213,10 +6073,15 @@ packages: engines: {node: '>=10'} dev: true - /yoctocolors-cjs@2.1.2: - resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} - engines: {node: '>=18'} + /zod-openapi@5.4.3(zod@4.1.12): + resolution: {integrity: sha512-6kJ/gJdvHZtuxjYHoMtkl2PixCwRuZ/s79dVkEr7arHvZGXfx7Cvh53X3HfJ5h9FzGelXOXlnyjwfX0sKEPByw==} + engines: {node: '>=20'} + peerDependencies: + zod: ^3.25.74 || ^4.0.0 + dependencies: + zod: 4.1.12 + dev: false - /zod@4.0.17: - resolution: {integrity: sha512-1PHjlYRevNxxdy2JZ8JcNAw7rX8V9P1AKkP+x/xZfxB0K5FYfuV+Ug6P/6NVSR2jHQ+FzDDoDHS04nYUsOIyLQ==} + /zod@4.1.12: + resolution: {integrity: sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==} dev: false diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6e226ed..a7b6d46 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,9 @@ packages: + - "apps/*" - "examples/*" - "packages/*" + - "packages/api/*" + - "packages/api/client/*" - "packages/events/*" - "packages/helpers/*" - "packages/oauth/*" diff --git a/tsconfig.json b/tsconfig.json index 31aa0c9..0368282 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,39 @@ { "include": [], - "references": [{ "path": "./packages/api" }, { "path": "./packages/cli" }] + "references": [ + { "path": "./apps/race-events" }, + { "path": "./apps/sync-car-assets-cli" }, + { "path": "./apps/sync-track-assets-cli" }, + { "path": "./examples/iracing-proxy-api-example" }, + { "path": "./examples/kapps-hello-world" }, + { "path": "./examples/player-pit-stop-events" }, + { "path": "./examples/telemetry-client" }, + { "path": "./packages/api/client/axios" }, + { "path": "./packages/api/client/fetch" }, + { "path": "./packages/api/router" }, + { "path": "./packages/api/schema" }, + { "path": "./packages/events/car-session-flag-events" }, + { "path": "./packages/events/car-track-location-events" }, + { "path": "./packages/events/pace-flag-events" }, + { "path": "./packages/events/pace-order-events" }, + { "path": "./packages/events/pit-lane-events" }, + { "path": "./packages/events/player-pit-stop-events" }, + { "path": "./packages/events/session-flag-events" }, + { "path": "./packages/events/session-state-events" }, + { "path": "./packages/events/track-location-events" }, + { "path": "./packages/helpers/api-schema-to-openapi" }, + { "path": "./packages/helpers/iracing-json-schema-to-typescript" }, + { "path": "./packages/helpers/oauth-schema-to-openapi" }, + { "path": "./packages/helpers/sync-car-assets" }, + { "path": "./packages/helpers/sync-telemetry-json-schema" }, + { "path": "./packages/helpers/sync-track-assets" }, + { "path": "./packages/iracing-telemetry-grpc-node" }, + { "path": "./packages/iracing-telemetry-grpc-web" }, + { "path": "./packages/iracing-telemetry-http" }, + { "path": "./packages/iracing-telemetry-types" }, + { "path": "./packages/iracing-telemetry-ws" }, + { "path": "./packages/oauth/client" }, + { "path": "./packages/oauth/router" }, + { "path": "./packages/oauth/schema" } + ] }