Clean prepaid SoT, identity mailbox, public access planes, leaf policy, fleet spawn
Some checks are pending
offline / test (push) Waiting to run

Persist account-balance books; edge caches prepaid from books. Add zappier-identity, verae-nats-accounts, verae-jobs-events, verae-access-staff, zapier-decisions. Edge binds loopback; lan-134 stays off; HTTP services prefer local spawn.
This commit is contained in:
George Lambert 2026-09-11 17:15:16 -04:00
parent 345aeeead9
commit ddf772454b
153 changed files with 2236 additions and 116 deletions

View file

@ -23,6 +23,7 @@ One MD file per source module.
- [zappier/index](zappier/index.md)
- [zappier/invoicing](zappier/invoicing.md)
- [zappier/jobs/report-usage](zappier/jobs/report-usage.md)
- [zappier/ledger](zappier/ledger.md)
- [zappier/meter](zappier/meter.md)
- [zappier/nats-shim.d](zappier/nats-shim.d.md)
- [zappier/paths](zappier/paths.md)
@ -121,6 +122,7 @@ One MD file per source module.
- [verae-zapier-simulator/server](verae-zapier-simulator/server.md)
- [verae-zapier-simulator/trace](verae-zapier-simulator/trace.md)
- [zappier-account-balance/books](zappier-account-balance/books.md)
- [zappier-account-balance/persist](zappier-account-balance/persist.md)
- [zappier-account-balance/server](zappier-account-balance/server.md)
- [zappier-account-balance/subjects](zappier-account-balance/subjects.md)
- [zappier-customer-service/nats-billing](zappier-customer-service/nats-billing.md)
@ -136,5 +138,14 @@ One MD file per source module.
- [verae-access-web/gate](verae-access-web/gate.md)
- [verae-access-web/server](verae-access-web/server.md)
- [verae-access-api/server](verae-access-api/server.md)
- [verae-access-leaf/allow](verae-access-leaf/allow.md)
- [verae-access-leaf/server](verae-access-leaf/server.md)
- [verae-access-zapier/server](verae-access-zapier/server.md)
- [verae-access-staff/server](verae-access-staff/server.md)
- [zappier-identity/ids](zappier-identity/ids.md)
- [zappier-identity/server](zappier-identity/server.md)
- [zappier-identity/store](zappier-identity/store.md)
- [zappier-identity/subjects](zappier-identity/subjects.md)
- [verae-jobs-events/server](verae-jobs-events/server.md)
- [verae-jobs-events/subjects](verae-jobs-events/subjects.md)
- [verae-nats-accounts/policy](verae-nats-accounts/policy.md)

View file

@ -0,0 +1,41 @@
# `verae-access-leaf/allow`
**Package:** `verae-access-leaf`
**Source:** `packages/verae-access-leaf/src/allow.js`
**Lines:** 29
## What this module is
Implementation module in `verae-access-leaf`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`leafAllowList`, `leafAllowed`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `leafAllowList` | `(none)` | — | `unknown` | see Call graph |
| `leafAllowed` | `subject` | — | `unknown` | see Call graph |
## What it imports / requires
- `node:fs`
## Call graph (identifiers invoked)
`leafAllowList`, `existsSync`, `parse`, `readFileSync`, `leafAllowed`, `some`, `endsWith`, `startsWith`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -2,7 +2,7 @@
**Package:** `verae-access-leaf`
**Source:** `packages/verae-access-leaf/src/server.js`
**Lines:** 95
**Lines:** 99
## What this module is
@ -29,10 +29,11 @@ _None extracted._
## What it imports / requires
- `node:http`
- `./allow.js`
## Call graph (identifiers invoked)
`subjects`, `replace`, `check`, `fetch`, `stringify`, `json`, `authorizedToken`, `forward`, `import`, `connect`, `split`, `publish`, `encode`, `flush`, `close`, `startNats`, `async`, `subscribe`, `parse`, `decode`, `respond`, `write`, `createServer`, `writeHead`, `end`, `push`, `concat`, `toString`, `listen`
`subjects`, `replace`, `check`, `fetch`, `stringify`, `json`, `authorizedToken`, `forward`, `leafAllowed`, `import`, `connect`, `split`, `publish`, `encode`, `flush`, `close`, `startNats`, `async`, `subscribe`, `parse`, `decode`, `respond`, `write`, `createServer`, `writeHead`, `end`, `push`, `concat`, `toString`, `listen`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -0,0 +1,41 @@
# `verae-access-staff/server`
**Package:** `verae-access-staff`
**Source:** `packages/verae-access-staff/src/server.js`
**Lines:** 58
## What this module is
Implementation module in `verae-access-staff`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
_No named `export` / `module.exports` keys detected._
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `check` | `subject, extra = {}` | — | `unknown` | see Call graph |
| `json` | `code, obj` | — | `unknown` | see Call graph |
## What it imports / requires
- `node:http`
## Call graph (identifiers invoked)
`plane`, `replace`, `check`, `fetch`, `stringify`, `json`, `createServer`, `async`, `writeHead`, `end`, `match`, `push`, `parse`, `concat`, `toString`, `listen`, `write`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -50,7 +50,7 @@ _None extracted._
## Call graph (identifiers invoked)
`loadFleet`, `slice`, `print`, `write`, `stringify`, `help`, `off`, `pause`, `json`, `identityFile`, `login`, `api`, `request`, `on`, `push`, `concat`, `toString`, `resolve`, `parse`, `end`, `main`, `listServices`, `padEnd`, `padStart`, `import`, `find`, `sshCheck`, `keys`, `startService`, `tick`, `start`, `startControlServer`, `async`, `stop`, `stopAll`, `exit`, `test`
`loadFleet`, `slice`, `print`, `write`, `stringify`, `help`, `off`, `pause`, `json`, `identityFile`, `login`, `api`, `request`, `on`, `push`, `concat`, `toString`, `resolve`, `parse`, `end`, `main`, `listServices`, `padEnd`, `padStart`, `import`, `find`, `sshCheck`, `startControlServer`, `keys`, `startService`, `tick`, `start`, `async`, `stop`, `stopAll`, `exit`, `test`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -2,7 +2,7 @@
**Package:** `verae-fleet`
**Source:** `packages/verae-fleet/src/machines.js`
**Lines:** 108
**Lines:** 116
## What this module is
@ -25,7 +25,7 @@ _None extracted._
| `normalizeMachine` | `m` | — | `unknown` | see Call graph |
| `upsertMachine` | `list, spec` | — | `unknown` | see Call graph |
| `canHost` | `machine, serviceId, role` | — | `unknown` | see Call graph |
| `pickMachine` | `machines, instances, serviceId, role, exclude = []` | machines: `object[]`, serviceId: `string`, role: `string` | `unknown` | see Call graph |
| `pickMachine` | `machines, instances, serviceId, role, exclude = [], opts = {}` | machines: `object[]`, serviceId: `string`, role: `string` | `unknown` | see Call graph |
| `saveOverlay` | `overlayPath, machines` | — | `unknown` | see Call graph |
## What it imports / requires

View file

@ -34,7 +34,7 @@ _None extracted._
## Call graph (identifiers invoked)
`join`, `dirname`, `fileURLToPath`, `json`, `writeHead`, `end`, `stringify`, `import`, `startControlServer`, `createServer`, `async`, `snapshot`, `reset`, `push`, `parse`, `concat`, `toString`, `run`, `listServices`, `status`, `addMachine`, `match`, `checkMachine`, `setMachineEnabled`, `reconcile`, `startService`, `stopService`, `pauseService`, `resumeService`, `fn`, `pauseInstance`, `resumeInstance`, `restartInstance`, `stopInstance`, `markUnhealthy`, `createReadStream`, `pipe`, `startsWith`, `normalize`, `existsSync`, `statSync`, `isFile`, `extname`, `toLowerCase`, `listen`, `write`
`bind`, `join`, `dirname`, `fileURLToPath`, `json`, `writeHead`, `end`, `stringify`, `import`, `startControlServer`, `createServer`, `async`, `snapshot`, `reset`, `push`, `parse`, `concat`, `toString`, `run`, `listServices`, `status`, `addMachine`, `match`, `checkMachine`, `setMachineEnabled`, `reconcile`, `startService`, `stopService`, `pauseService`, `resumeService`, `fn`, `pauseInstance`, `resumeInstance`, `restartInstance`, `stopInstance`, `markUnhealthy`, `createReadStream`, `pipe`, `startsWith`, `normalize`, `existsSync`, `statSync`, `isFile`, `extname`, `toLowerCase`, `listen`, `write`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -25,7 +25,7 @@ _None extracted._
| `sshTarget` | `machine` | — | `unknown` | see Call graph |
| `sshBaseArgs` | `machine` | — | `unknown` | see Call graph |
| `scpBaseArgs` | `machine` | — | `unknown` | see Call graph |
| `sshExec` | `machine, remoteCommand, { timeoutMs = 20000 } = {}` | — | `unknown` | see Call graph |
| `sshExec` | `machine, remoteCommand, { timeoutMs = 8000 } = {}` | — | `unknown` | see Call graph |
| `scpTo` | `machine, localFiles, remoteDir` | — | `unknown` | see Call graph |
| `ensureRemoteRuntime` | `machine` | — | `unknown` | see Call graph |
| `sshSpawnWorker` | `machine, { instance, env }` | — | `unknown` | see Call graph |

View file

@ -2,7 +2,7 @@
**Package:** `verae-fleet`
**Source:** `packages/verae-fleet/src/supervisor.js`
**Lines:** 528
**Lines:** 529
## What this module is

View file

@ -0,0 +1,41 @@
# `verae-jobs-events/server`
**Package:** `verae-jobs-events`
**Source:** `packages/verae-jobs-events/src/server.js`
**Lines:** 43
## What this module is
Implementation module in `verae-jobs-events`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
_No named `export` / `module.exports` keys detected._
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `startNats` | `(none)` | — | `unknown` | see Call graph |
## What it imports / requires
- `node:http`
- `./subjects.js`
## Call graph (identifiers invoked)
`startNats`, `import`, `connect`, `split`, `subscribe`, `parse`, `decode`, `respond`, `encode`, `stringify`, `createServer`, `writeHead`, `end`, `listen`, `write`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -0,0 +1,36 @@
# `verae-jobs-events/subjects`
**Package:** `verae-jobs-events`
**Source:** `packages/verae-jobs-events/src/subjects.js`
**Lines:** 5
## What this module is
Implementation module in `verae-jobs-events`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`SUBJECTS`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## What it imports / requires
_No imports detected._
## Call graph (identifiers invoked)
_No local call identifiers extracted._
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -0,0 +1,43 @@
# `verae-nats-accounts/policy`
**Package:** `verae-nats-accounts`
**Source:** `packages/verae-nats-accounts/src/policy.js`
**Lines:** 15
## What this module is
Implementation module in `verae-nats-accounts`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`loadPolicy`, `leafAllowed`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `loadPolicy` | `(none)` | — | `unknown` | see Call graph |
| `leafAllowed` | `subject` | — | `unknown` | see Call graph |
## What it imports / requires
- `node:fs`
- `node:path`
- `node:url`
## Call graph (identifiers invoked)
`join`, `dirname`, `fileURLToPath`, `loadPolicy`, `parse`, `readFileSync`, `leafAllowed`, `some`, `endsWith`, `startsWith`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -2,7 +2,7 @@
**Package:** `verae-zapier-simulator`
**Source:** `packages/verae-zapier-simulator/src/server.js`
**Lines:** 87
**Lines:** 88
## What this module is

View file

@ -2,7 +2,7 @@
**Package:** `zappier-account-balance`
**Source:** `packages/zappier-account-balance/src/books.js`
**Lines:** 100
**Lines:** 120
## What this module is
@ -36,6 +36,8 @@ Implementation module in `zappier-account-balance`. The tables below are extract
| `recordUsage` | `entry` |
| `recordPayment` | `entry` |
| `statement` | `customerId` |
| `dump` | `(none)` |
| `load` | `raw` |
## What it imports / requires
@ -43,7 +45,7 @@ _No imports detected._
## Call graph (identifiers invoked)
`constructor`, `remember`, `prepaidCents`, `adjust`, `trunc`, `now`, `toString`, `random`, `slice`, `toISOString`, `unshift`, `recordUsage`, `recordPayment`, `statement`, `filter`, `match`, `handle`, `endsWith`
`constructor`, `remember`, `prepaidCents`, `adjust`, `trunc`, `now`, `toString`, `random`, `slice`, `toISOString`, `unshift`, `recordUsage`, `recordPayment`, `statement`, `filter`, `match`, `dump`, `load`, `isArray`, `handle`, `endsWith`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -0,0 +1,50 @@
# `zappier-account-balance/persist`
**Package:** `zappier-account-balance`
**Source:** `packages/zappier-account-balance/src/persist.js`
**Lines:** 29
## What this module is
Implementation module in `zappier-account-balance`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`booksPath`, `loadInto`, `saveFrom`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `booksPath` | `(none)` | — | `unknown` | see Call graph |
| `loadInto` | `books` | — | `unknown` | see Call graph |
| `saveFrom` | `books` | — | `unknown` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `return` | `process.env.BOOKS_PATH ||
path.join(process.env.FLEET_STATE_DIR || process.cwd(` |
## What it imports / requires
- `node:fs`
- `node:path`
## Call graph (identifiers invoked)
`booksPath`, `join`, `cwd`, `loadInto`, `existsSync`, `load`, `parse`, `readFileSync`, `saveFrom`, `mkdirSync`, `dirname`, `writeFileSync`, `stringify`, `dump`, `renameSync`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -2,7 +2,7 @@
**Package:** `zappier-account-balance`
**Source:** `packages/zappier-account-balance/src/server.js`
**Lines:** 93
**Lines:** 101
## What this module is
@ -20,6 +20,7 @@ _None extracted._
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `apply` | `subject, payload` | — | `unknown` | see Call graph |
| `startNats` | `(none)` | — | `unknown` | see Call graph |
| `readBody` | `req` | — | `unknown` | see Call graph |
| `reply` | `sub, fn` | — | `unknown` | see Call graph |
@ -29,6 +30,7 @@ _None extracted._
| Name | Parameters |
|------|------------|
| `saveFrom` | `books` |
| `reply` | `nc.subscribe(SUBJECTS.STATEMENT_GET, { queue: SUBJECTS.QUEUE }` |
| `reply` | `nc.subscribe(SUBJECTS.BALANCE_GET, { queue: SUBJECTS.QUEUE }` |
| `reply` | `nc.subscribe(SUBJECTS.BALANCE_ADJUST, { queue: SUBJECTS.QUEUE }` |
@ -38,10 +40,11 @@ _None extracted._
- `node:http`
- `./books.js`
- `./subjects.js`
- `./persist.js`
## Call graph (identifiers invoked)
`startNats`, `import`, `connect`, `split`, `async`, `parse`, `decode`, `fn`, `respond`, `encode`, `stringify`, `reply`, `subscribe`, `handle`, `write`, `readBody`, `on`, `push`, `resolve`, `concat`, `toString`, `createServer`, `writeHead`, `end`, `json`, `match`, `statement`, `adjust`, `listen`
`loadInto`, `apply`, `handle`, `saveFrom`, `startNats`, `import`, `connect`, `split`, `async`, `parse`, `decode`, `fn`, `respond`, `encode`, `stringify`, `reply`, `subscribe`, `write`, `readBody`, `on`, `push`, `resolve`, `concat`, `toString`, `createServer`, `writeHead`, `end`, `json`, `match`, `statement`, `listen`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -0,0 +1,41 @@
# `zappier-identity/ids`
**Package:** `zappier-identity`
**Source:** `packages/zappier-identity/src/ids.js`
**Lines:** 16
## What this module is
Implementation module in `zappier-identity`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`stableVeraeUserId`, `bindEmail`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `stableVeraeUserId` | `username` | — | `unknown` | see Call graph |
| `bindEmail` | `email` | — | `unknown` | see Call graph |
## What it imports / requires
- `node:crypto`
## Call graph (identifiers invoked)
`stableVeraeUserId`, `trim`, `toLowerCase`, `createHash`, `update`, `digest`, `slice`, `bindEmail`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -0,0 +1,53 @@
# `zappier-identity/server`
**Package:** `zappier-identity`
**Source:** `packages/zappier-identity/src/server.js`
**Lines:** 90
## What this module is
Implementation module in `zappier-identity`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
_No named `export` / `module.exports` keys detected._
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `handleBind` | `p` | — | `unknown` | see Call graph |
| `handleLookup` | `p` | — | `unknown` | see Call graph |
| `startNats` | `(none)` | — | `unknown` | see Call graph |
| `readBody` | `req` | — | `unknown` | see Call graph |
| `json` | `code, obj` | — | `unknown` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `put` | `db, { customerId, ...bound }` |
## What it imports / requires
- `node:http`
- `./ids.js`
- `./store.js`
- `./subjects.js`
## Call graph (identifiers invoked)
`load`, `handleBind`, `bindEmail`, `put`, `handleLookup`, `startNats`, `import`, `connect`, `split`, `async`, `subscribe`, `parse`, `decode`, `respond`, `encode`, `stringify`, `readBody`, `on`, `push`, `resolve`, `concat`, `toString`, `createServer`, `writeHead`, `end`, `json`, `match`, `listen`, `write`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -0,0 +1,50 @@
# `zappier-identity/store`
**Package:** `zappier-identity`
**Source:** `packages/zappier-identity/src/store.js`
**Lines:** 31
## What this module is
Implementation module in `zappier-identity`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`load`, `save`, `put`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `load` | `(none)` | — | `unknown` | see Call graph |
| `save` | `db` | — | `unknown` | see Call graph |
| `put` | `db, { customerId, veraeUserId, veraeUsername }` | — | `unknown` | see Call graph |
| `file` | `(none)` | — | `unknown` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `save` | `db` |
## What it imports / requires
- `node:fs`
- `node:path`
## Call graph (identifiers invoked)
`join`, `cwd`, `load`, `file`, `existsSync`, `parse`, `readFileSync`, `save`, `mkdirSync`, `dirname`, `writeFileSync`, `stringify`, `put`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -0,0 +1,36 @@
# `zappier-identity/subjects`
**Package:** `zappier-identity`
**Source:** `packages/zappier-identity/src/subjects.js`
**Lines:** 6
## What this module is
Implementation module in `zappier-identity`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`SUBJECTS`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## What it imports / requires
_No imports detected._
## Call graph (identifiers invoked)
_No local call identifiers extracted._
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -2,7 +2,7 @@
**Package:** `zappier`
**Source:** `packages/zappier/src/admin.ts`
**Lines:** 593
**Lines:** 597
## What this module is
@ -63,10 +63,11 @@ Implementation module in `zappier`. The tables below are extracted from the sour
- `./accounting-export`
- `./statement`
- `./billing-nats`
- `./ledger`
## Call graph (identifiers invoked)
`tokens`, `adminLoginRouter`, `post`, `status`, `json`, `findByUsername`, `verifyPassword`, `randomBytes`, `toString`, `set`, `now`, `adminAuth`, `header`, `next`, `startsWith`, `slice`, `has`, `isValidRule`, `every`, `isValidTier`, `periodWindow`, `split`, `map`, `parseDate`, `trim`, `isNaN`, `getTime`, `escapeHtml`, `replace`, `toFixed`, `renderInvoiceHtml`, `dollars`, `join`, `toISOString`, `toUpperCase`, `adminRouter`, `get`, `getRateCard`, `getTiers`, `put`, `upsertEndpoint`, `delete`, `deleteEndpoint`, `upsertTier`, `deleteTier`, `list`, `randomUUID`, `save`, `find`, `isFinite`, `trunc`, `add`, `natsPublish`, `natsAdjust`, `async`, `natsStatement`, `composeStatement`, `listFor`, `type`, `send`
`tokens`, `adminLoginRouter`, `post`, `status`, `json`, `findByUsername`, `verifyPassword`, `randomBytes`, `toString`, `set`, `now`, `adminAuth`, `header`, `next`, `startsWith`, `slice`, `has`, `isValidRule`, `every`, `isValidTier`, `periodWindow`, `split`, `map`, `parseDate`, `trim`, `isNaN`, `getTime`, `escapeHtml`, `replace`, `toFixed`, `renderInvoiceHtml`, `dollars`, `join`, `toISOString`, `toUpperCase`, `adminRouter`, `get`, `getRateCard`, `getTiers`, `put`, `upsertEndpoint`, `delete`, `deleteEndpoint`, `upsertTier`, `deleteTier`, `list`, `randomUUID`, `save`, `find`, `async`, `isFinite`, `trunc`, `add`, `ledgerAdjust`, `booksConfigured`, `natsPublish`, `ledgerStatement`, `composeStatement`, `listFor`, `type`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -2,7 +2,7 @@
**Package:** `zappier`
**Source:** `packages/zappier/src/index.ts`
**Lines:** 42
**Lines:** 43
## What this module is

View file

@ -0,0 +1,52 @@
# `zappier/ledger`
**Package:** `zappier`
**Source:** `packages/zappier/src/ledger.ts`
**Lines:** 51
## What this module is
Implementation module in `zappier`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`PrepaidRow`, `booksConfigured`, `ledgerAdjust`, `ledgerStatement`
## Types / interfaces / classes
| Kind | Name |
|------|------|
| type | `PrepaidRow` |
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `booksUrl` | `(none)` | — | `unknown` | see Call graph |
| `booksConfigured` | `(none)` | — | `unknown` | see Call graph |
| `ledgerAdjust` | `row: PrepaidRow, plane: AccessPlane` | — | `unknown` | see Call graph |
| `ledgerStatement` | `customerId: string, plane: AccessPlane, veraeUserId?: string` | — | `unknown` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `return` | `process.env.ACCOUNT_BALANCE_URL || ''` |
| `return` | `await r.json(` |
## What it imports / requires
- `./billing-nats`
## Call graph (identifiers invoked)
`booksUrl`, `replace`, `booksConfigured`, `ledgerAdjust`, `natsAdjust`, `fetch`, `stringify`, `json`, `ledgerStatement`, `natsStatement`, `encodeURIComponent`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.
## Return values (how to read this)
- HTTP route handlers return Express `res.json(...)` bodies (see route docs).
- Zapier `perform` functions return a **single object** (creates) or an **array** (triggers/searches).
- Pricing functions return integer **cents** on `Quote.totalCents`.

View file

@ -52,10 +52,11 @@ Implementation module in `zappier`. The tables below are extracted from the sour
- `./statement`
- `./billing-nats`
- `./verae-bind`
- `./ledger`
## Call graph (identifiers invoked)
`now`, `reload`, `customer`, `publicProfile`, `sessionAuth`, `header`, `startsWith`, `slice`, `get`, `list`, `find`, `status`, `json`, `next`, `save`, `portalRouter`, `post`, `async`, `trim`, `test`, `hashPassword`, `findByEmail`, `randomBytes`, `toString`, `bindVeraeUser`, `create`, `verifyPassword`, `verifyTotp`, `use`, `delete`, `setUTCDate`, `setUTCHours`, `summaryFor`, `tiers`, `applyMonthlyCredit`, `rateCard`, `natsStatement`, `composeStatement`, `listFor`, `type`, `send`, `renderInvoiceHtml`, `generateTotpSecret`, `totpUri`, `qr`, `isInteger`, `natsPublish`, `natsAdjust`, `put`
`now`, `reload`, `customer`, `publicProfile`, `sessionAuth`, `header`, `startsWith`, `slice`, `get`, `list`, `find`, `status`, `json`, `next`, `save`, `portalRouter`, `post`, `async`, `trim`, `test`, `hashPassword`, `findByEmail`, `randomBytes`, `toString`, `bindVeraeUser`, `create`, `verifyPassword`, `verifyTotp`, `use`, `delete`, `setUTCDate`, `setUTCHours`, `summaryFor`, `tiers`, `applyMonthlyCredit`, `rateCard`, `ledgerStatement`, `composeStatement`, `listFor`, `type`, `send`, `renderInvoiceHtml`, `generateTotpSecret`, `totpUri`, `qr`, `isInteger`, `ledgerAdjust`, `booksConfigured`, `natsPublish`, `put`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

View file

@ -2,7 +2,7 @@
**Package:** `zappier`
**Source:** `packages/zappier/src/verae-bind.ts`
**Lines:** 77
**Lines:** 90
## What this module is
@ -25,7 +25,7 @@ Implementation module in `zappier`. The tables below are extracted from the sour
| `normalizeVeraeUsername` | `username: string` | — | `unknown` | see Call graph |
| `stableVeraeUserId` | `username: string` | — | `unknown` | see Call graph |
| `mockBind` | `email: string` | — | `unknown` | see Call graph |
| `bindVeraeUser` | `email: string` | — | `unknown` | see Call graph |
| `bindVeraeUser` | `email: string, customerId?: string` | — | `unknown` | see Call graph |
| `login` | `username: string, pass: string` | — | `unknown` | see Call graph |
## What it imports / requires
@ -34,7 +34,7 @@ Implementation module in `zappier`. The tables below are extracted from the sour
## Call graph (identifiers invoked)
`normalizeVeraeUsername`, `trim`, `toLowerCase`, `stableVeraeUserId`, `createHash`, `update`, `digest`, `slice`, `mockBind`, `bindVeraeUser`, `replace`, `randomBytes`, `toString`, `async`, `fetch`, `stringify`, `json`, `login`
`normalizeVeraeUsername`, `trim`, `toLowerCase`, `stableVeraeUserId`, `createHash`, `update`, `digest`, `slice`, `mockBind`, `bindVeraeUser`, `replace`, `fetch`, `stringify`, `json`, `randomBytes`, `toString`, `async`, `login`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.