Milestone 2: module/model docs (MD, Sphinx RST, PDF) and work log

74 source modules documented with extracted signatures, JSDoc params,
imports, and call graphs. 10 first-class models (PriceRule through
StatusResponse) have their own MD/RST/PDF. Sphinx HTML builds from
docs/sphinx. Per-module PDFs in docs/modules-pdf and docs/models-pdf.

Middleware gates 2–6 and 10 pass on MOCK_VERAE without NATS.

Learned: RST includes are relative to the RST file; keep one PDF per
module; Add Numbers remains the only push required tomorrow.
This commit is contained in:
George Lambert 2026-09-09 02:44:51 -04:00
commit 10c663cc0c
38 changed files with 17200 additions and 14 deletions

View file

@ -0,0 +1,45 @@
# `verae-zapier-middleware/app`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/app.js`
**Lines:** 51
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`createApp`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `createApp` | `options = {}` | — | `import('express').Express` | see Call graph |
## What it imports / requires
- `express`
- `./errors.js`
- `./debug/logger.js`
- `./debug/trace.js`
- `./routes/index.js`
- `./store/db.js`
## Call graph (identifiers invoked)
`createDebugger`, `app`, `import`, `createApp`, `loadStore`, `express`, `disable`, `use`, `json`, `get`, `sendError`, `info`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,66 @@
# `verae-zapier-middleware/clients/veraeClient`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/clients/veraeClient.js`
**Lines:** 288
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`veraeClient`, `clearMockJobs`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `delay` | `ms` | ms: `number` | `Promise<void>` | see Call graph |
| `mockLogin` | `{ username, password }` | ms: `number` | `Promise<void>` | see Call graph |
| `mockValidate` | `token` | — | `unknown` | see Call graph |
| `mockCreateTimestamp` | `{ data, hashAlg }` | — | `unknown` | see Call graph |
| `mockGetStatus` | `jobId` | — | `unknown` | see Call graph |
| `mockVerify` | `{ certificate }` | — | `unknown` | see Call graph |
| `request` | `path, { method = 'GET', token, body } = {}` | path: `string` | `Promise<any>` | see Call graph |
| `clearMockJobs` | `(none)` | — | `void` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `setTimeout` | `(` |
| `login` | `credentials` |
| `validate` | `token` |
| `createTimestamp` | `token, body` |
| `createBatchTimestamp` | `token, body` |
| `getStatus` | `token, jobId` |
| `getBatchStatus` | `token, body` |
| `verify` | `token, body` |
| `verifyBatch` | `token, body` |
| `getJobVerification` | `token, jobId` |
| `waitForJob` | `token, jobId, { maxAttempts, intervalMs }` |
## What it imports / requires
- `node:crypto`
- `../config.js`
- `../errors.js`
- `../debug/logger.js`
## Call graph (identifiers invoked)
`net`, `createDebugger`, `delay`, `setTimeout`, `mockLogin`, `now`, `toISOString`, `randomUUID`, `includes`, `mockValidate`, `startsWith`, `replace`, `mockCreateTimestamp`, `set`, `get`, `mockGetStatus`, `mockVerify`, `request`, `debug`, `fetch`, `stringify`, `text`, `parse`, `error`, `client`, `login`, `validate`, `createTimestamp`, `createBatchTimestamp`, `push`, `getStatus`, `encodeURIComponent`, `getBatchStatus`, `verify`, `verifyBatch`, `getJobVerification`, `waitForJob`, `jobs`, `clearMockJobs`, `clear`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,45 @@
# `verae-zapier-middleware/config`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/config.js`
**Lines:** 143
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`loadEnvFile`, `config`, `PLAN_LIMITS`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `loadEnvFile` | `(none)` | — | `void` | see Call graph |
| `bool` | `value, fallback = false` | value: `string|undefined`, fallback: `boolean` | `boolean` | see Call graph |
| `int` | `value, fallback` | value: `string|undefined`, fallback: `number` | `number` | see Call graph |
## What it imports / requires
- `node:fs`
- `node:path`
- `node:url`
- `./debug/logger.js`
## Call graph (identifiers invoked)
`createDebugger`, `dirname`, `fileURLToPath`, `resolve`, `loadEnvFile`, `existsSync`, `readFileSync`, `split`, `trim`, `startsWith`, `indexOf`, `slice`, `bool`, `includes`, `toLowerCase`, `int`, `parseInt`, `isFinite`, `replace`, `info`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,43 @@
# `verae-zapier-middleware/debug/config`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/debug/config.js`
**Lines:** 107
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`parseDebugVeraeEnv`, `parseLevel`, `loadDebugConfig`, `shouldLog`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `parseDebugVeraeEnv` | `raw` | raw: `string|undefined` | `{ enabled: boolean, namespaces: Set<string>|null ` — } | see Call graph |
| `parseLevel` | `raw, fallback = 'debug'` | raw: `string|undefined`, fallback: `'debug'|'info'|'warn'|'error'` | `'debug'|'info'|'warn'|'error'` | see Call graph |
| `loadDebugConfig` | `env = process.env` | env: `NodeJS.ProcessEnv` | `DebugConfig` | see Call graph |
| `shouldLog` | `config, namespace, messageLevel` | config: `DebugConfig`, namespace: `string`, messageLevel: `'debug'|'info'|'warn'|'error'` | `boolean` | see Call graph |
## What it imports / requires
_No imports detected._
## Call graph (identifiers invoked)
`value`, `parseDebugVeraeEnv`, `trim`, `toLowerCase`, `split`, `map`, `filter`, `parseLevel`, `namespaces`, `loadDebugConfig`, `namespace`, `shouldLog`, `has`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,39 @@
# `verae-zapier-middleware/debug/index`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/debug/index.js`
**Lines:** 25
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
_No named `export` / `module.exports` keys detected._
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## What it imports / requires
- `./config.js`
- `./logger.js`
- `./redact.js`
- `./trace.js`
## 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,47 @@
# `verae-zapier-middleware/debug/logger`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/debug/logger.js`
**Lines:** 122
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`setDebugTestSink`, `formatLogLine`, `createDebugger`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `setDebugTestSink` | `sink` | sink: `null|((line: string) => void)` | `void` | see Call graph |
| `formatLogLine` | `{ level, namespace, message, meta, traceId }` | parts: `object`, parts.level: `string`, parts.namespace: `string`, parts.message: `string`, parts.meta: `Record<string, unknown>|undefined`, parts.traceId: `string|null` | `string` | see Call graph |
| `emit` | `line, filePath` | line: `string`, filePath: `string|null` | `void` | see Call graph |
| `createDebugger` | `namespace` | namespace: `string` | `Debugger` — Logger with debug/info/warn/error methods. | see Call graph |
| `write` | `level, message, meta` | level: `'debug'|'info'|'warn'|'error'`, message: `string`, meta: `Record<string, unknown>` | `unknown` | see Call graph |
## What it imports / requires
- `node:fs`
- `./config.js`
- `./redact.js`
- `./trace-context.js`
## Call graph (identifiers invoked)
`setDebugTestSink`, `formatLogLine`, `toISOString`, `keys`, `stringify`, `redact`, `toUpperCase`, `emit`, `testSink`, `error`, `appendFileSync`, `createDebugger`, `debug`, `toLowerCase`, `write`, `loadDebugConfig`, `shouldLog`, `getTraceId`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,41 @@
# `verae-zapier-middleware/debug/redact`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/debug/redact.js`
**Lines:** 94
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`redactString`, `redact`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `redactString` | `value` | value: `string` | `string` — Original or `[REDACTED]`. | see Call graph |
| `redact` | `input, depth = 0` | input: `unknown`, depth: `number` | `unknown` — Redacted structure safe for logging. | see Call graph |
## What it imports / requires
_No imports detected._
## Call graph (identifiers invoked)
`redactString`, `test`, `redact`, `isArray`, `map`, `entries`, `has`, `toLowerCase`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,43 @@
# `verae-zapier-middleware/debug/trace-context`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/debug/trace-context.js`
**Lines:** 40
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`traceStorage`, `generateTraceId`, `getTraceId`, `getTraceContext`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `generateTraceId` | `(none)` | — | `string` | see Call graph |
| `getTraceId` | `(none)` | — | `string|null` | see Call graph |
| `getTraceContext` | `(none)` | — | `TraceContext|null` | see Call graph |
## What it imports / requires
- `node:async_hooks`
- `node:crypto`
## Call graph (identifiers invoked)
`context`, `id`, `generateTraceId`, `randomBytes`, `toString`, `getTraceId`, `getStore`, `getTraceContext`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,48 @@
# `verae-zapier-middleware/debug/trace`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/debug/trace.js`
**Lines:** 96
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`withTrace`, `traceMiddleware`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `withTrace` | `options, fn` | options: `object|(() => T|Promise<T>)`, options.traceId: `string`, options.span: `string`, fn: `() => T|Promise<T>` | `T|Promise<T>` — Return value of `fn`. | see Call graph |
| `traceMiddleware` | `req, res, next` | req: `import('express').Request`, res: `import('express').Response`, next: `import('express').NextFunction` | `void` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `withTrace` | `{ traceId, span: `${req.method} ${req.path}` }, (` |
## What it imports / requires
- `./logger.js`
- `./trace-context.js`
## Call graph (identifiers invoked)
`createDebugger`, `id`, `span`, `withTrace`, `async`, `getTraceId`, `getStore`, `generateTraceId`, `run`, `debug`, `callback`, `then`, `import`, `traceMiddleware`, `trim`, `setHeader`, `next`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,51 @@
# `verae-zapier-middleware/errors`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/errors.js`
**Lines:** 76
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`AppError`, `asyncHandler`, `sendError`
## Types / interfaces / classes
| Kind | Name |
|------|------|
| class | `AppError` |
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `asyncHandler` | `fn` | fn: `(req: import('express').Request, res: import('express').Response, next: import('express').NextFunction) => Promise<unknown>` | `import('express').RequestHandler` | see Call graph |
| `sendError` | `res, err` | res: `import('express').Response`, err: `Error|AppError` | `void` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `constructor` | `message, { status = 500, code = 'INTERNAL_ERROR', details } = {}` |
| `return` | `req, res, next` |
## What it imports / requires
- `./debug/logger.js`
- `./debug/trace-context.js`
## Call graph (identifiers invoked)
`createDebugger`, `details`, `constructor`, `import`, `asyncHandler`, `resolve`, `fn`, `sendError`, `getTraceId`, `error`, `debug`, `status`, `json`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,52 @@
# `verae-zapier-middleware/index`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/index.js`
**Lines:** 52
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`startServer`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `startServer` | `(none)` | — | `import('http').Server` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `startServer` | `(none)` |
## What it imports / requires
- `./app.js`
- `./config.js`
- `./debug/logger.js`
- `./workers/inProcessJobPoller.js`
- `./nats/connection.js`
- `./workers/jobPollerWorker.js`
- `./workers/webhookWorker.js`
## Call graph (identifiers invoked)
`createDebugger`, `import`, `startServer`, `createApp`, `connectNats`, `then`, `ensureStreams`, `all`, `startJobPollerWorker`, `startWebhookWorker`, `info`, `error`, `startInProcessJobPoller`, `listen`, `log`, `includes`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,46 @@
# `verae-zapier-middleware/lib/tokens`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/lib/tokens.js`
**Lines:** 98
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`issueSessionToken`, `parseSessionToken`, `generateApiKey`, `isApiKey`, `extractBearerToken`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `sign` | `payload` | payload: `string` | `string` | see Call graph |
| `issueSessionToken` | `{ tenantId, veraeToken, expiresAt }` | params: `object`, params.tenantId: `string`, params.veraeToken: `string`, params.expiresAt: `string` | `string` — Token string starting with `zmt_` | see Call graph |
| `parseSessionToken` | `token` | token: `string` | `{ tenantId: string, veraeToken: string, expiresAt?: string, nonce?: string ` — |null} | see Call graph |
| `generateApiKey` | `(none)` | — | `string` | see Call graph |
| `isApiKey` | `value` | value: `unknown` | `boolean` | see Call graph |
| `extractBearerToken` | `header` | header: `string|undefined` | `string|null` | see Call graph |
## What it imports / requires
- `node:crypto`
- `../config.js`
## Call graph (identifiers invoked)
`sign`, `createHmac`, `update`, `digest`, `issueSessionToken`, `from`, `stringify`, `randomBytes`, `toString`, `parseSessionToken`, `startsWith`, `slice`, `lastIndexOf`, `timingSafeEqual`, `parse`, `key`, `generateApiKey`, `isApiKey`, `extractBearerToken`, `match`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,47 @@
# `verae-zapier-middleware/middleware/authenticate`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/middleware/authenticate.js`
**Lines:** 28
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`authenticate`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `next` | `(none)` |
## What it imports / requires
- `../lib/tokens.js`
- `../services/authService.js`
- `../errors.js`
- `../debug/logger.js`
## Call graph (identifiers invoked)
`createDebugger`, `asyncHandler`, `async`, `extractBearerToken`, `resolveAuthContext`, `debug`, `next`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,48 @@
# `verae-zapier-middleware/middleware/rateLimit`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/middleware/rateLimit.js`
**Lines:** 57
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`resetRateLimitWindows`, `rateLimit`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `resetRateLimitWindows` | `(none)` | — | `void` | see Call graph |
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `next` | `(none)` |
## What it imports / requires
- `../errors.js`
- `../store/tenants.js`
- `../debug/logger.js`
## Call graph (identifiers invoked)
`createDebugger`, `windows`, `resetRateLimitWindows`, `clear`, `asyncHandler`, `async`, `next`, `getTenant`, `resolveLimits`, `now`, `get`, `set`, `debug`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,46 @@
# `verae-zapier-middleware/nats/connection`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/nats/connection.js`
**Lines:** 112
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`connectNats`, `ensureStreams`, `closeNats`, `getJetStream`, `isNatsConnected`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `connectNats` | `url = config.natsUrl` | url: `string` | `Promise<{ nc: import('nats').NatsConnection, js: import('nats').JetStreamClient, jsm: import('nats').JetStreamManager ` — >} | see Call graph |
| `ensureStreams` | `manager` | manager: `import('nats').JetStreamManager` | `Promise<void>` | see Call graph |
| `closeNats` | `(none)` | — | `Promise<void>` | see Call graph |
| `getJetStream` | `(none)` | — | `import('nats').JetStreamClient|null` | see Call graph |
| `isNatsConnected` | `(none)` | — | `boolean` | see Call graph |
## What it imports / requires
- `../debug/logger.js`
- `../config.js`
- `./subjects.js`
## Call graph (identifiers invoked)
`createDebugger`, `import`, `connectNats`, `debug`, `disabled`, `info`, `connect`, `jetstream`, `jetstreamManager`, `ensureStreams`, `add`, `closeNats`, `drain`, `getJetStream`, `isNatsConnected`, `isClosed`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,46 @@
# `verae-zapier-middleware/nats/publishers`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/nats/publishers.js`
**Lines:** 96
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`enqueueWatch`, `publishJobEvent`, `enqueueWebhook`
## Types / interfaces / classes
_None extracted._
## Functions
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|------|------------|---------------------|---------|-----------------------------|
| `requireJs` | `(none)` | — | `Promise<import('nats').JetStreamClient>` | see Call graph |
| `enqueueWatch` | `partial` | partial: `object` | `Promise<{ seq: number ` — >} | see Call graph |
| `publishJobEvent` | `partial` | partial: `object` | `Promise<{ seq: number ` — >} | see Call graph |
| `enqueueWebhook` | `partial` | partial: `object` | `Promise<{ seq: number ` — >} | see Call graph |
## What it imports / requires
- `../debug/logger.js`
- `../debug/trace-context.js`
- `./subjects.js`
- `./connection.js`
## Call graph (identifiers invoked)
`createDebugger`, `import`, `requireJs`, `getJetStream`, `connectNats`, `enqueueWatch`, `toISOString`, `getTraceId`, `debug`, `publish`, `stringify`, `publishJobEvent`, `enqueueWebhook`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,38 @@
# `verae-zapier-middleware/nats/subjects`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/nats/subjects.js`
**Lines:** 44
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`SUBJECTS`, `STREAMS`, `CONSUMERS`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## What it imports / requires
_No imports detected._
## Call graph (identifiers invoked)
`freeze`, `names`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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 @@
# `verae-zapier-middleware/routes/authRoutes`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/routes/authRoutes.js`
**Lines:** 58
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`authRoutes`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `asyncHandler` | `async (req, res` |
| `asyncHandler` | `async (req, res` |
## What it imports / requires
- `express`
- `../errors.js`
- `../services/authService.js`
- `../store/usage.js`
- `../store/tenants.js`
- `../lib/tokens.js`
## Call graph (identifiers invoked)
`post`, `asyncHandler`, `async`, `loginWithApiKey`, `json`, `loginWithCredentials`, `get`, `extractBearerToken`, `validateSession`, `getTenant`, `getUsageSummary`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,46 @@
# `verae-zapier-middleware/routes/index`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/routes/index.js`
**Lines:** 34
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`apiRoutes`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## What it imports / requires
- `express`
- `./authRoutes.js`
- `./timestampRoutes.js`
- `./verifyRoutes.js`
- `./statusRoutes.js`
- `./webhookRoutes.js`
- `./tenantRoutes.js`
- `../middleware/authenticate.js`
- `../middleware/rateLimit.js`
## Call graph (identifiers invoked)
`use`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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,48 @@
# `verae-zapier-middleware/routes/statusRoutes`
**Package:** `verae-zapier-middleware`
**Source:** `packages/verae-zapier-middleware/src/routes/statusRoutes.js`
**Lines:** 47
## What this module is
Implementation module in `verae-zapier-middleware`. The tables below are extracted from the source (signatures + JSDoc).
## Exports
`statusRoutes`
## Types / interfaces / classes
_None extracted._
## Functions
_No top-level functions extracted._
## Methods (class / object)
| Name | Parameters |
|------|------------|
| `asyncHandler` | `async (req, res` |
| `asyncHandler` | `async (req, res` |
| `asyncHandler` | `async (req, res` |
## What it imports / requires
- `express`
- `../errors.js`
- `../services/timestampService.js`
## Call graph (identifiers invoked)
`post`, `asyncHandler`, `async`, `isArray`, `getBatchJobStatus`, `json`, `get`, `getJobVerification`, `getJobStatus`
Each identifier is a call site in this file. Follow the import list to see the defining module; open that module’s 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`.

Some files were not shown because too many files have changed in this diff Show more