use schemars::JsonSchema;
use serde::Deserialize;
#[derive(Debug, Deserialize, JsonSchema)]
pub struct GetJobFeedbackInput {
#[schemars(description = "Event ID (hex) of the job request")]
pub job_event_id: String,
#[schemars(description = "Timeout in seconds to wait for feedback (default: 60)")]
pub timeout_secs: Option<u64>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct SubmitAndPayJobInput {
#[schemars(description = "The task input text to send to the provider")]
pub input: String,
#[schemars(description = "Provider npub (bech32) to direct the job to")]
pub provider_npub: String,
#[schemars(description = "Input type: 'text' or 'url' (default: 'text')")]
pub input_type: Option<String>,
#[schemars(description = "Bid amount in lamports (e.g. 10000000 = 0.01 SOL)")]
pub bid_amount: Option<u64>,
#[schemars(description = "Job kind offset (default 100 for kind:5100)")]
pub kind_offset: Option<u16>,
#[schemars(description = "Capability tags for the job request")]
pub tags: Option<Vec<String>>,
#[schemars(description = "Total timeout in seconds for the full flow: submit → pay → result (default: 300)")]
pub timeout_secs: Option<u64>,
#[schemars(description = "Maximum price in lamports the user is willing to pay. If omitted or if provider asks more, returns price for user confirmation instead of auto-paying. Always confirm price with the user first.")]
pub max_price_lamports: Option<u64>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct BuyCapabilityInput {
#[schemars(description = "Provider npub (bech32) to buy from")]
pub provider_npub: String,
#[schemars(description = "Capability name from the provider's card (e.g. 'Landing page'). Converted to a dTag automatically.")]
pub capability: String,
#[schemars(description = "Optional input text to send to the provider (default: empty)")]
pub input: Option<String>,
#[schemars(description = "Maximum price in lamports (only for paid capabilities). If omitted and provider requests payment, returns price for user confirmation.")]
pub max_price_lamports: Option<u64>,
#[schemars(description = "Total timeout in seconds (default: 120)")]
pub timeout_secs: Option<u64>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ListMyJobsInput {
#[schemars(description = "Maximum number of jobs to return (default: 20, max: 50)")]
pub limit: Option<usize>,
#[schemars(description = "Job kind offset to filter by (default: 100 for kind:5100)")]
pub kind_offset: Option<u16>,
#[schemars(description = "Fetch results and feedback for each job (default: true). Set to false for a faster listing.")]
pub include_results: Option<bool>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct PingAgentInput {
#[schemars(description = "Agent npub (bech32) to check for liveness")]
pub agent_npub: String,
#[schemars(description = "Timeout in seconds to wait for pong response (default: 15)")]
pub timeout_secs: Option<u64>,
}