Milestone 0: import zappier billing, Verae middleware, and Zapier research
Compose-ready workspace: packages/zappier (rate card, portal, Stripe), packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier (CLI app), vendor/zapier-platform, and research/zapier vendor corpus. Gate 0 structure checks pass. Product code and research are not yet wired.
This commit is contained in:
commit
b4150c8250
1364 changed files with 6814366 additions and 0 deletions
35
docs/developer/modules/workers.md
Normal file
35
docs/developer/modules/workers.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Module: `workers`
|
||||
|
||||
**Path:** `verae-zapier-middleware/src/workers/`
|
||||
**Phases:** 6 (in-process), 8–9 (NATS)
|
||||
|
||||
## Files
|
||||
|
||||
| File | Phase | Purpose |
|
||||
|------|-------|---------|
|
||||
| `inProcessJobPoller.js` | 6 | Fallback poller when `NATS_ENABLED=false` |
|
||||
| `jobPollerWorker.js` | 8 | JetStream job watch consumer |
|
||||
| `webhookWorker.js` | 8 | JetStream webhook deliver consumer |
|
||||
|
||||
## `startJobPollerWorker()`
|
||||
|
||||
| | |
|
||||
|--|--|
|
||||
| **For** | Poll Verae until job terminal; publish events |
|
||||
| **Input** | none (uses NATS + config) |
|
||||
| **Output** | `Promise<{ stop: () => Promise<void> }>` |
|
||||
| **Debug** | `jobs`, `http`, `nats` |
|
||||
|
||||
## `startWebhookWorker()`
|
||||
|
||||
| | |
|
||||
|--|--|
|
||||
| **For** | POST completion payloads to Zapier hook URLs |
|
||||
| **Output** | `Promise<{ stop: () => Promise<void> }>` |
|
||||
| **Debug** | `webhooks`, `nats` |
|
||||
|
||||
## Rules
|
||||
|
||||
- Only one of in-process poller **or** NATS job worker should run.
|
||||
- Never log raw JWTs or full webhook secrets.
|
||||
- Queue groups allow horizontal scale without double delivery.
|
||||
Loading…
Add table
Add a link
Reference in a new issue