pub use crate::shared_types::{
AnswerContent, AnswerFormat, ConfirmationAnswer, ConfirmationAnswerWithDate,
ConfirmationQuestion, QuestionMethod,
};
#[derive(Debug, Clone)]
pub struct WaitHumanConfig {
pub api_key: String,
pub endpoint: Option<String>,
}
impl WaitHumanConfig {
pub fn new<S: Into<String>>(api_key: S) -> Self {
Self {
api_key: api_key.into(),
endpoint: None,
}
}
pub fn with_endpoint<S: Into<String>>(mut self, endpoint: S) -> Self {
self.endpoint = Some(endpoint.into());
self
}
}
#[derive(Debug, Clone, Default)]
pub struct AskOptions {
pub timeout_seconds: Option<u64>,
}
#[derive(serde::Serialize, Debug)]
pub(crate) struct CreateConfirmationRequest {
pub question: ConfirmationQuestion,
}
#[derive(serde::Deserialize, Debug)]
pub(crate) struct CreateConfirmationResponse {
pub confirmation_request_id: String,
}
#[derive(serde::Deserialize, Debug)]
pub(crate) struct GetConfirmationResponse {
pub maybe_answer: Option<ConfirmationAnswerWithDate>,
}