Some checks are pending
offline / test (push) Waiting to run
Each module has SUMMARY.md and NATS.md (who sends/receives, subject addresses, payload). Tests: splitter 3, worm 3, aggregator 2. Forgejo repos pushed separately; this commit keeps them in the monorepo.
29 lines
1.2 KiB
Markdown
29 lines
1.2 KiB
Markdown
# Message flows
|
|
|
|
## 1. Create timestamp (async)
|
|
|
|
1. Zapier → `POST https://zappier-edge/v1/timestamp` (`x-api-key`)
|
|
2. zappier-edge meters → `POST middleware/zapier/v1/timestamp`
|
|
3. splitter: chain sha256; optional `verae.archive.put`
|
|
4. middleware → chain create or existing lookup
|
|
5. middleware publishes `verae.zapier.jobs.watch` `{ jobId, tenantId, … }`
|
|
6. HTTP 202 `{ jobId }` back to Zapier
|
|
7. job-poller consumes watch, GET chain status
|
|
8. On terminal: `verae.zapier.jobs.events`
|
|
9. webhook-deliver POSTs Zapier REST Hook if subscribed
|
|
|
|
## 2. Wait
|
|
|
|
Same as (1) but HTTP holds until `jobs.events` or `WAIT_TIMEOUT_MS` → `{ status: pending, jobId }`.
|
|
|
|
## 3. Hash already registered
|
|
|
|
Step 4 returns original jobId + original seal. No second chain write. `receipts[0].kind = seal`. Later archive attaches become `receipts[1…]` if `includeAttached`.
|
|
|
|
## 4. includeAttached
|
|
|
|
After seal is known, aggregator publishes `verae.archive.query`. Each WORM: bloom miss = no packet; hit = `verae.archive.reply.<correlationId>`. Aggregator merges into wait JSON.
|
|
|
|
## 5. Multipart attachments
|
|
|
|
Splitter emits one `archive.put` per file (`kind: file`, `contentSha256`). Chain never stores bytes.
|