UNPKG

ade-planning-api

Version:

An unofficial API wrapper for ADE Planning from Adesoft

25 lines (24 loc) 918 B
import type { Credentials } from "../models/auth"; import type { Fetcher } from "../models/utils"; export declare class ADEFetcher implements Fetcher { readonly apiUrl: string; private sessionToken; constructor(baseUrl: string); /** * Initializes a new session with the API. * @param credentials The credentials to use for authentication. * @returns A promise that resolves when the session is initialized. */ initializeSession(credentials: Credentials): Promise<void>; /** * Terminates the current session with the API. * @returns A promise that resolves when the session is terminated. */ terminateSession(): Promise<void>; /** * Fetches data from the API. * @param params The parameters to include in the request. * @returns A promise that resolves with the fetched data. */ get<T>(params?: Record<string, any>): Promise<T>; }