/** * Utility Functions * * Internal utilities for the OneRoster client. * @internal */ import type { TimebackGrade } from '@timeback/types'; /** * Scoped logger for the OneRoster client. * Only logs debug/info when DEBUG=1 or DEBUG=true. */ export declare const log: import("@timeback/internal-logger").Logger; /** * Convert grade strings from API responses to numeric TimebackGrade values. * * The API returns grades as strings (e.g., "5", "-1") because the database * stores them as text. This function normalizes them to numbers for * a better developer experience. * * @param grades - Array of string grades from API, or undefined * @returns Array of numeric grades, or undefined if input was undefined * * @example * ```typescript * parseGrades(["1", "2", "3"]) // [1, 2, 3] * parseGrades(undefined) // undefined * ``` */ export declare function parseGrades(grades: string[] | undefined): TimebackGrade[] | undefined; /** * Normalize a date string to `YYYY-MM-DD`. * * The Beyond-AI API sometimes returns ISO timestamps (e.g., `2024-01-01T00:00:00.000Z`) * for fields that are conceptually dates. Our client normalizes these to date-only * strings for a stable, predictable API. * * @param date - Date string from the API * @returns Normalized date string in `YYYY-MM-DD` format */ export declare function normalizeDateOnly(date: string): string; /** * Normalize a boolean-like value to a boolean. * * The Beyond-AI API sometimes returns boolean fields as strings (`"true"`/`"false"`). * Our client normalizes these for a stable, predictable API. * * @param value - Boolean-like value from the API * @returns Normalized boolean */ export declare function normalizeBoolean(value: boolean | string): boolean; //# sourceMappingURL=utils.d.ts.map