//! Gateway endpoints that expose generic CRUD access routes backed by Supabase/Postgres clients.
//!
//! Each submodule implements one slice of functionality (delete, fetch, insert, query, update)
//! and wires up the Actix request handlers that power the `/gateway/*` routes.
//!
//! # Example
//! ```text
//! /gateway/data -> fetch::fetch_data_route
//! /gateway/insert -> insert::insert_data
//! /gateway/delete -> delete::delete_data
//! /gateway/query -> query::gateway_query_route
//! ```
pub mod auth;
pub mod contracts;
pub mod deadpool_timeout;
pub mod deferred;
pub mod delete;
pub mod fetch;
pub mod insert;
pub mod pool_resolver;
pub mod postgrest;
pub mod query;
pub mod resilience;
pub mod response;
pub mod rpc;
pub mod update;

pub use contracts::{
    GatewayApiRequest, GatewayApiRequestPayload, GatewayDeleteRequest, GatewayFetchRequest,
    GatewayInsertRequest, GatewayOperationKind, GatewayRequestCondition, GatewayRowsMeta,
    GatewayRowsResponse, GatewayRpcFilter, GatewayRpcFilterOperator, GatewayRpcOrder,
    GatewayRpcRequest, GatewaySqlExecutionRequest, GatewaySqlRequest, GatewayUpdateRequest,
    extract_update_payload, parse_columns_from_body, parse_conditions_from_body,
};
