"""Advanced assertion library for VenomQA.

Provides fluent and functional assertion APIs for testing HTTP responses,
database state, performance, schemas, and search/ranking results.

Example:
    >>> from venomqa.assertions import expect, assert_status_code, assert_row_exists
    >>>
    >>> # Fluent API
    >>> expect(response).to_have_status(200)
    >>> expect(data).to_contain("item")
    >>>
    >>> # Functional API
    >>> assert_status_code(response, 200)
    >>> assert_row_exists(db, "users", {"id": 1})
"""

from venomqa.assertions.database import (
    ColumnValueInvariant,
    DatabaseAssertionError,
    DatabaseConnection,
    NoNullsInvariant,
    ReferentialIntegrityInvariant,
    RowCountInvariant,
    SQLInvariant,
    assert_column_avg,
    assert_column_contains,
    assert_column_sum,
    assert_column_unique,
    assert_column_value_equals,
    assert_column_values,
    assert_foreign_key_valid,
    assert_row_count,
    assert_row_count_at_least,
    assert_row_count_at_most,
    assert_row_exists,
    assert_row_not_exists,
)
from venomqa.assertions.expect import (
    AssertionFailed,
    AssertionFailedError,
    Expectation,
    ResponseExpectation,
    expect,
    expect_response,
)
from venomqa.assertions.http import (
    HTTPAssertionError,
    assert_bad_request,
    assert_client_error,
    assert_content_type,
    assert_cookie_set,
    assert_created,
    assert_forbidden,
    assert_header,
    assert_header_contains,
    assert_json_array_length,
    assert_json_contains,
    assert_json_path,
    assert_no_content,
    assert_not_found,
    assert_ok,
    assert_redirect,
    assert_response_time,
    assert_server_error,
    assert_status_code,
    assert_unauthorized,
)
from venomqa.assertions.ranking import (
    RankingAssertionError,
    assert_all_have_field,
    assert_minimum_results,
    assert_no_duplicates,
    assert_ordered_before,
    assert_relevance_score_threshold,
    assert_result_count,
    assert_score_ascending,
    assert_score_descending,
    assert_score_range,
    assert_top_n_contains,
    assert_top_n_exactly,
    assert_top_n_ordered,
)
from venomqa.assertions.schema import (
    SchemaAssertionError,
    assert_in_range,
    assert_is_array,
    assert_is_boolean,
    assert_is_integer,
    assert_is_non_negative_integer,
    assert_is_number,
    assert_is_object,
    assert_is_positive_integer,
    assert_is_string,
    assert_matches_pattern,
    assert_matches_schema,
    assert_valid_email,
    assert_valid_iso_date,
    assert_valid_iso_datetime,
    assert_valid_url,
    assert_valid_uuid,
)
from venomqa.assertions.timing import (
    PerformanceTimer,
    TimeoutError,
    TimingAssertionError,
    assert_completes_within,
    assert_concurrent_completes,
    assert_eventual_success,
    assert_eventually_equals,
    assert_performance_regression,
    assert_response_time_under,
    assert_stable_for,
    assert_throughput_at_least,
    timed,
)

__all__ = [
    "expect",
    "expect_response",
    "Expectation",
    "ResponseExpectation",
    "AssertionFailed",
    "AssertionFailedError",
    "HTTPAssertionError",
    "assert_status_code",
    "assert_response_time",
    "assert_header",
    "assert_header_contains",
    "assert_json_contains",
    "assert_json_path",
    "assert_json_array_length",
    "assert_content_type",
    "assert_ok",
    "assert_created",
    "assert_no_content",
    "assert_bad_request",
    "assert_unauthorized",
    "assert_forbidden",
    "assert_not_found",
    "assert_client_error",
    "assert_server_error",
    "assert_cookie_set",
    "assert_redirect",
    "RankingAssertionError",
    "assert_top_n_contains",
    "assert_top_n_exactly",
    "assert_top_n_ordered",
    "assert_ordered_before",
    "assert_score_range",
    "assert_score_descending",
    "assert_score_ascending",
    "assert_result_count",
    "assert_minimum_results",
    "assert_no_duplicates",
    "assert_all_have_field",
    "assert_relevance_score_threshold",
    "TimingAssertionError",
    "TimeoutError",
    "PerformanceTimer",
    "assert_completes_within",
    "assert_response_time_under",
    "assert_eventual_success",
    "assert_eventually_equals",
    "assert_stable_for",
    "assert_performance_regression",
    "assert_throughput_at_least",
    "assert_concurrent_completes",
    "timed",
    "SchemaAssertionError",
    "assert_matches_schema",
    "assert_valid_email",
    "assert_valid_uuid",
    "assert_valid_url",
    "assert_valid_iso_date",
    "assert_valid_iso_datetime",
    "assert_is_integer",
    "assert_is_positive_integer",
    "assert_is_non_negative_integer",
    "assert_is_number",
    "assert_is_string",
    "assert_is_boolean",
    "assert_is_array",
    "assert_is_object",
    "assert_in_range",
    "assert_matches_pattern",
    "DatabaseAssertionError",
    "DatabaseConnection",
    "assert_row_exists",
    "assert_row_not_exists",
    "assert_row_count",
    "assert_row_count_at_least",
    "assert_row_count_at_most",
    "assert_column_values",
    "assert_column_contains",
    "assert_column_value_equals",
    "assert_column_sum",
    "assert_column_avg",
    "assert_column_unique",
    "assert_foreign_key_valid",
    "SQLInvariant",
    "RowCountInvariant",
    "ColumnValueInvariant",
    "NoNullsInvariant",
    "ReferentialIntegrityInvariant",
]
