// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../repository_values.dart';

/// Cursor contract for bounded repository queries.
class PageRequest {
  /// Creates a `PageRequest` instance with the values required by its invariants.
  /// Callers should pass already-normalized scheduler data because validation and defaulting belong at the model or service boundary, not in arbitrary UI code.
  const PageRequest({
    this.cursor,
    this.limit = 100,
  }) : assert(limit > 0);

  /// Adapter-neutral cursor. Implementations choose the cursor format.
  final String? cursor;

  /// Maximum number of records to return.
  final int limit;
}
