/** * Academic Sessions Resource * * Manage academic sessions (terms, semesters, school years, grading periods). */ import { Paginator } from '../../lib'; import { BaseResource } from '../base'; import type { z } from 'zod/v4'; import type { AcademicSessionCreateInput } from '@timeback/types/zod'; import type { AcademicSession, AcademicSessionFilterFields, Class, ClassFilterFields, CreateResponse, GradingPeriod, ListParamsNoSearch, OneRosterTransportLike, TermsCallable } from '../../types'; /** * Resource for all academic sessions regardless of type. * * For type-specific access, use TermsResource or GradingPeriodsResource. */ export declare class AcademicSessionsResource extends BaseResource> { constructor(transport: OneRosterTransportLike); protected get unwrapKey(): string; protected get wrapKey(): string; protected get createSchema(): z.ZodTypeAny; protected get updateSchema(): z.ZodTypeAny; protected transform(session: AcademicSession): AcademicSession; } /** * Scoped resource for operations on a specific term. * * Access via `client.terms(termId)`. * * @example * ```typescript * const term = await client.terms(termId).get() * const classes = await client.terms(termId).classes() * ``` */ export declare class ScopedTermResource { private readonly transport; private readonly basePath; constructor(transport: OneRosterTransportLike, termId: string); /** * Get the term details. * @returns The term object */ get(): Promise; /** * Check whether this term exists. * @returns True if found, false for 404 */ exists(): Promise; /** * List classes in this term. * @param params - Optional `where` clause and pagination parameters * @returns Promise resolving to class array */ classes(params?: ListParamsNoSearch): Promise; /** * Stream classes with lazy pagination. * @param params - Optional `where` clause and pagination parameters * @returns Paginator for streaming classes */ streamClasses(params?: ListParamsNoSearch): Paginator; /** * List grading periods in this term. * @param params - Optional `where` clause and pagination parameters * @returns Promise resolving to grading period array */ gradingPeriods(params?: ListParamsNoSearch): Promise; /** * Stream grading periods with lazy pagination. * @param params - Optional `where` clause and pagination parameters * @returns Paginator for streaming grading periods */ streamGradingPeriods(params?: ListParamsNoSearch): Paginator; /** * Create a grading period in this term. * * @param data - Grading period data * @returns Create response with sourcedIdPairs * @throws {InputValidationError} If required fields are missing */ createGradingPeriod(data: AcademicSessionCreateInput): Promise; } /** * Create a callable terms resource. * @param transport - OneRoster transport instance * @returns Callable resource for terms */ export declare function createTermsResource(transport: OneRosterTransportLike): TermsCallable; /** * Resource for grading periods only. * * Filtered view of academic sessions with grading period type. */ export declare class GradingPeriodsResource extends BaseResource> { constructor(transport: OneRosterTransportLike); protected get unwrapKey(): string; protected get wrapKey(): string; protected get createSchema(): z.ZodTypeAny; protected get updateSchema(): z.ZodTypeAny; protected transform(gp: AcademicSession): AcademicSession; /** * XXX: The Beyond-AI API expects grading period creates/updates to be wrapped as * `{ academicSession: ... }`, even though GET responses use `gradingPeriod`. * * @param data - Academic session input payload for a grading period * @returns Wrapped request body */ protected wrapBody(data: AcademicSessionCreateInput): Record; } //# sourceMappingURL=academic-sessions.d.ts.map