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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! `autumn-plugin-shopify`: build Shopify apps on Autumn.
//!
//! - Signed webhooks, routed by topic, with a duplicate guard.
//! - OAuth install with expiring offline tokens and refresh.
//! - An Admin GraphQL client that retries throttled calls.
//!
//! ```no_run
//! use autumn_plugin_shopify::{ShopifyPlugin, WebhookContext};
//! use autumn_web::prelude::*;
//!
//! async fn order_created(ctx: WebhookContext) -> AutumnResult<()> {
//! let order: serde_json::Value = ctx.json().map_err(|e| e.to_autumn_error())?;
//! tracing::info!(shop = %ctx.shop, id = %order["id"], "order created");
//! Ok(())
//! }
//!
//! #[autumn_web::main]
//! async fn main() {
//! autumn_web::app()
//! .plugin(ShopifyPlugin::new().webhook("orders/create", order_created))
//! .run()
//! .await;
//! }
//! ```
//!
//! ## Modules
//!
//! | Module | Purpose |
//! |---|---|
//! | [`config`] | `[shopify]` config, `SHOPIFY_*` env, builder closures |
//! | [`types`] | [`ShopDomain`], [`Topic`], [`ApiVersion`] |
//! | [`verify`] | Webhook and OAuth HMAC checks |
//! | [`webhooks`] | The webhook route, extractor, and topic registry |
//! | [`delivery`] | Duplicate-delivery guard |
//! | [`oauth`] | Install and callback routes, token exchange, refresh |
//! | [`tokens`] | Token storage |
//! | [`client`] | Admin GraphQL client |
//! | [`health`] | Health check |
//! | [`plugin`] | [`ShopifyPlugin`], [`ShopifyRuntime`], [`Shopify`] |
//! | [`error`] | [`Error`], [`ErrorKind`], HTTP status mapping |
pub use ;
pub use ShopifyConfig;
pub use ;
pub use ;
pub use ShopifyHealth;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;