1pub use crate::shared_types::{
3 AnswerContent, AnswerFormat, ConfirmationAnswer, ConfirmationAnswerWithDate,
4 ConfirmationQuestion, QuestionMethod,
5};
6
7#[derive(Debug, Clone)]
9pub struct WaitHumanConfig {
10 pub api_key: String,
12 pub endpoint: Option<String>,
14}
15
16impl WaitHumanConfig {
17 pub fn new<S: Into<String>>(api_key: S) -> Self {
19 Self {
20 api_key: api_key.into(),
21 endpoint: None,
22 }
23 }
24
25 pub fn with_endpoint<S: Into<String>>(mut self, endpoint: S) -> Self {
27 self.endpoint = Some(endpoint.into());
28 self
29 }
30}
31
32#[derive(Debug, Clone, Default)]
34pub struct AskOptions {
35 pub timeout_seconds: Option<u64>,
37}
38
39#[derive(serde::Serialize, Debug)]
41pub(crate) struct CreateConfirmationRequest {
42 pub question: ConfirmationQuestion,
43}
44
45#[derive(serde::Deserialize, Debug)]
46pub(crate) struct CreateConfirmationResponse {
47 pub confirmation_request_id: String,
48}
49
50#[derive(serde::Deserialize, Debug)]
51pub(crate) struct GetConfirmationResponse {
52 pub maybe_answer: Option<ConfirmationAnswerWithDate>,
53}