mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
feat(routing): Add api-refs for new decision engine endpoints (#8709)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -170,6 +170,9 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::routing::toggle_elimination_routing,
|
||||
routes::routing::contract_based_routing_setup_config,
|
||||
routes::routing::contract_based_routing_update_configs,
|
||||
routes::routing::call_decide_gateway_open_router,
|
||||
routes::routing::call_update_gateway_score_open_router,
|
||||
routes::routing::evaluate_routing_rule,
|
||||
|
||||
// Routes for blocklist
|
||||
routes::blocklist::remove_entry_from_blocklist,
|
||||
@ -809,6 +812,22 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::authentication::ThreeDsData,
|
||||
api_models::authentication::AuthenticationEligibilityRequest,
|
||||
api_models::authentication::AuthenticationEligibilityResponse,
|
||||
api_models::open_router::OpenRouterDecideGatewayRequest,
|
||||
api_models::open_router::DecideGatewayResponse,
|
||||
api_models::open_router::UpdateScorePayload,
|
||||
api_models::open_router::UpdateScoreResponse,
|
||||
api_models::routing::RoutingEvaluateRequest,
|
||||
api_models::routing::RoutingEvaluateResponse,
|
||||
api_models::routing::ValueType,
|
||||
api_models::routing::DeRoutableConnectorChoice,
|
||||
api_models::routing::RoutableConnectorChoice,
|
||||
api_models::open_router::PaymentInfo,
|
||||
common_utils::id_type::PaymentId,
|
||||
common_utils::id_type::ProfileId,
|
||||
api_models::open_router::RankingAlgorithm,
|
||||
api_models::open_router::TxnStatus,
|
||||
api_models::open_router::PriorityLogicOutput,
|
||||
api_models::open_router::PriorityLogicData,
|
||||
api_models::user::PlatformAccountCreateRequest,
|
||||
api_models::user::PlatformAccountCreateResponse,
|
||||
)),
|
||||
|
||||
@ -386,3 +386,69 @@ pub async fn contract_based_routing_setup_config() {}
|
||||
security(("api_key" = []), ("jwt_key" = []))
|
||||
)]
|
||||
pub async fn contract_based_routing_update_configs() {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
/// Routing - Evaluate
|
||||
///
|
||||
/// Evaluate routing rules
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/routing/evaluate",
|
||||
request_body = OpenRouterDecideGatewayRequest,
|
||||
responses(
|
||||
(status = 200, description = "Routing rules evaluated successfully", body = DecideGatewayResponse),
|
||||
(status = 400, description = "Request body is malformed"),
|
||||
(status = 500, description = "Internal server error"),
|
||||
(status = 404, description = "Resource missing"),
|
||||
(status = 422, description = "Unprocessable request"),
|
||||
(status = 403, description = "Forbidden"),
|
||||
),
|
||||
tag = "Routing",
|
||||
operation_id = "Evaluate routing rules",
|
||||
security(("api_key" = []))
|
||||
)]
|
||||
pub async fn call_decide_gateway_open_router() {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
/// Routing - Feedback
|
||||
///
|
||||
/// Update gateway scores for dynamic routing
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/routing/feedback",
|
||||
request_body = UpdateScorePayload,
|
||||
responses(
|
||||
(status = 200, description = "Gateway score updated successfully", body = UpdateScoreResponse),
|
||||
(status = 400, description = "Request body is malformed"),
|
||||
(status = 500, description = "Internal server error"),
|
||||
(status = 404, description = "Resource missing"),
|
||||
(status = 422, description = "Unprocessable request"),
|
||||
(status = 403, description = "Forbidden"),
|
||||
),
|
||||
tag = "Routing",
|
||||
operation_id = "Update gateway scores",
|
||||
security(("api_key" = []))
|
||||
)]
|
||||
pub async fn call_update_gateway_score_open_router() {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
/// Routing - Rule Evaluate
|
||||
///
|
||||
/// Evaluate routing rules
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/routing/rule/evaluate",
|
||||
request_body = RoutingEvaluateRequest,
|
||||
responses(
|
||||
(status = 200, description = "Routing rules evaluated successfully", body = RoutingEvaluateResponse),
|
||||
(status = 400, description = "Request body is malformed"),
|
||||
(status = 500, description = "Internal server error"),
|
||||
(status = 404, description = "Resource missing"),
|
||||
(status = 422, description = "Unprocessable request"),
|
||||
(status = 403, description = "Forbidden"),
|
||||
),
|
||||
tag = "Routing",
|
||||
operation_id = "Evaluate routing rules (alternative)",
|
||||
security(("api_key" = []))
|
||||
)]
|
||||
pub async fn evaluate_routing_rule() {}
|
||||
|
||||
Reference in New Issue
Block a user