1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Rust SDK for [OpenIntents](https://openintents.io), the agentic API to buy
//! anything. Send an intent in plain language; the API does the agentic work
//! in a real browser, gets it paid (from your agent balance, or a payment
//! link) and resolves to a receipt.
//!
//! ```no_run
//! # async fn run() -> openintents::Result<()> {
//! use openintents::{Client, CreateIntent, IntentStatus};
//!
//! let oi = Client::from_env()?;
//! let intent = oi
//! .create_intent(CreateIntent::new("book an Uber to SFO at 7am").max_amount(6000))
//! .await?;
//! let intent = oi.wait(&intent.id, Default::default()).await?;
//! match intent.status {
//! IntentStatus::RequiresPayment => println!("pay: {}", intent.payment.unwrap().payment_url),
//! IntentStatus::Completed => println!("done: {:?}", intent.result),
//! other => println!("ended as {}", other.as_str()),
//! }
//! # Ok(()) }
//! ```
//!
//! Preview: the API is still being built and may change before launch.
// `Error::Api` keeps the API's error fields by value, the lease included.
// Errors are rare: moving a larger one now and then costs less than making
// every caller unbox it.
pub use ;
pub use ;
pub use EventStream;
pub use *;
pub use *;
pub use ;