use super::super::schemas::{ToolSchema, object_schema, safe_output_schema};
use crate::internal::auth::{ORDERS_PAPER_CANCEL, ORDERS_PAPER_MODIFY, ORDERS_PAPER_SUBMIT};
pub const PAPER_ORDER_SUBMIT_TOOL: &str = "ibkr_paper_order_submit";
pub const PAPER_ORDER_CANCEL_TOOL: &str = "ibkr_paper_order_cancel";
pub const PAPER_ORDER_MODIFY_TOOL: &str = "ibkr_paper_order_modify";
#[must_use]
pub fn paper_order_submit_schema() -> ToolSchema {
ToolSchema {
name: PAPER_ORDER_SUBMIT_TOOL.to_string(),
scope: ORDERS_PAPER_SUBMIT.to_string(),
input_schema: object_schema(&["account_id", "approval_id", "idempotency_key"]),
output_schema: safe_output_schema(),
}
}
#[must_use]
pub fn paper_order_cancel_schema() -> ToolSchema {
ToolSchema {
name: PAPER_ORDER_CANCEL_TOOL.to_string(),
scope: ORDERS_PAPER_CANCEL.to_string(),
input_schema: object_schema(&["account_id", "broker_order_id", "idempotency_key"]),
output_schema: safe_output_schema(),
}
}
#[must_use]
pub fn paper_order_modify_schema() -> ToolSchema {
ToolSchema {
name: PAPER_ORDER_MODIFY_TOOL.to_string(),
scope: ORDERS_PAPER_MODIFY.to_string(),
input_schema: object_schema(&["account_id", "broker_order_id", "idempotency_key"]),
output_schema: safe_output_schema(),
}
}