import { ApiEndpoints, Env, MethodAndPath } from "../types"; import { NewRelicEnabledClient } from "./new-relic"; import { RetryConfig } from "./fetch-utils"; export type ItemSession = { id: string; data: any[]; }; export type PlayerInfo = { js: { view: string[]; }; item: { models: any[]; elements: { [key: string]: string; }; markup: string; id: string; }; session: ItemSession; }; export declare const toMethodAndPath: (m: string | MethodAndPath) => MethodAndPath; export declare class PlayerApiClient extends NewRelicEnabledClient { readonly token: string; readonly endpoints: ApiEndpoints; readonly optimize: boolean; private readonly fetchUtils; constructor(token: string, endpoints: ApiEndpoints, optimize: boolean, retryConfig?: RetryConfig); /** * Implementation of the abstract method from NewRelicEnabledClient */ protected getTrackingBaseAttributes(): Record; /** * Make an API call with retry mechanism * * @param endpoint - The API endpoint to call (method and path) * @param data - The data to send in the request body (will be JSON stringified) * @returns A promise that resolves to the parsed response data * @throws Error if all retry attempts fail */ protected call(endpoint: MethodAndPath, data: any): Promise; load(itemId: string, sessionId: string, env: Env, assignmentId: string | undefined, overrides?: { [key: string]: string; }): Promise; saveSession(session: { id: string; data: any[]; }, env: any): Promise; model(session: ItemSession, env: any, overrides?: { [key: string]: string; }): Promise; score(session: ItemSession, env: Env, overrides?: { [key: string]: string; }): Promise; }