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

part of '../../repositories.dart';

/// Cursor contract for bounded repository queries.
class RepositoryPageRequest {
  /// Creates a `RepositoryPageRequest` 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 RepositoryPageRequest({
    this.cursor,
    this.limit = 100,
  }) : assert(limit > 0);

  /// Adapter-neutral cursor. In-memory repositories use an integer offset.
  final String? cursor;

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