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
44
45
46
47
48
49
50
51
52
53
54
//! Supabase Edge Functions HTTP client.
//!
//! This crate provides an HTTP client for invoking Supabase Edge Functions
//! deployed at `/functions/v1/{function_name}`.
//!
//! # Usage
//!
//! ```ignore
//! use supabase_client::prelude::*;
//! use serde_json::json;
//!
//! let client = SupabaseClient::new(config).await?;
//! let functions = client.functions()?;
//!
//! let response = functions.invoke("hello", InvokeOptions::new()
//! .body(json!({"name": "World"}))
//! ).await?;
//! let data: serde_json::Value = response.json()?;
//! ```
// Re-exports for convenient access
pub use FunctionsClient;
pub use ;
pub use *;
use SupabaseClient;
/// Extension trait to create a [`FunctionsClient`] from a [`SupabaseClient`].
///
/// # Example
/// ```ignore
/// use supabase_client::prelude::*;
/// use supabase_client_functions::SupabaseClientFunctionsExt;
///
/// let client = SupabaseClient::new(config).await?;
/// let functions = client.functions()?;
/// let response = functions.invoke("hello", InvokeOptions::new()).await?;
/// ```