wip
This commit is contained in:
@@ -19,8 +19,8 @@ graph TB
|
||||
E[Webhook Handler]
|
||||
F[Stripe Verifier]
|
||||
G[iDenfy Verifier]
|
||||
H[Script Dispatcher]
|
||||
I[RhaiDispatcherBuilder]
|
||||
H[Script Supervisor]
|
||||
I[RhaiSupervisorBuilder]
|
||||
end
|
||||
|
||||
subgraph "Configuration"
|
||||
@@ -92,8 +92,8 @@ sequenceDiagram
|
||||
participant WS as Webhook Service
|
||||
participant CS as Circle Server
|
||||
participant WV as Webhook Verifier
|
||||
participant SD as Script Dispatcher
|
||||
participant RC as RhaiDispatcher
|
||||
participant SD as Script Supervisor
|
||||
participant RC as RhaiSupervisor
|
||||
participant RW as Rhai Worker
|
||||
|
||||
WS->>CS: POST /webhooks/stripe/{circle_pk}
|
||||
@@ -113,7 +113,7 @@ sequenceDiagram
|
||||
|
||||
alt Verification Success
|
||||
CS->>SD: Dispatch appropriate script
|
||||
SD->>RC: Create RhaiDispatcherBuilder
|
||||
SD->>RC: Create RhaiSupervisorBuilder
|
||||
RC->>RC: Set caller_id="stripe" or "idenfy"
|
||||
RC->>RC: Set recipient_id=circle_pk
|
||||
RC->>RC: Set script="stripe_webhook_received" or "idenfy_webhook_received"
|
||||
@@ -248,8 +248,8 @@ heromodels/src/models/
|
||||
### Key Architectural Changes
|
||||
- **Type Organization**: Webhook payload types moved to `heromodels` library for reusability
|
||||
- **Modular Handlers**: Separate handler files for each webhook provider
|
||||
- **Simplified Architecture**: Removed unnecessary dispatcher complexity
|
||||
- **Direct Script Execution**: Handlers directly use `RhaiDispatcher` for script execution
|
||||
- **Simplified Architecture**: Removed unnecessary supervisor complexity
|
||||
- **Direct Script Execution**: Handlers directly use `RhaiSupervisor` for script execution
|
||||
|
||||
### Modified Files
|
||||
- `src/lib.rs` - Add webhook routes and module imports
|
||||
|
Reference in New Issue
Block a user