master-zapier-plan-draft/docs/sphinx/modules/zappier/billing-nats.md
George Lambert 345aeeead9
Some checks are pending
offline / test (push) Waiting to run
Bind each customer to a Verae userId for hop tracing
Signup registers/binds a Verae central user and stores veraeUserId. Public access stays the zappier API key. Chain JWTs stay server-side behind tokenRef. Authz, billing, and jobs.watch carry veraeUserId.
2026-09-11 16:18:06 -04:00

2.3 KiB
Raw Blame History

zappier/billing-nats

Package: zappier
Source: packages/zappier/src/billing-nats.ts
Lines: 138

What this module is

Implementation module in zappier. The tables below are extracted from the source (signatures + JSDoc).

Exports

BILLING_SUBJECTS, AUTHZ_CHECK, AccessPlane, BillingStatement, natsStatement, natsAdjust, natsPublish

Types / interfaces / classes

Kind Name
type AccessPlane
type BillingStatement
type Nc

Functions

Name Parameters Param types (JSDoc) Returns Calls (same file / helpers)
nc (none) unknown see Call graph
encode obj: unknown unknown see Call graph
decode buf: Uint8Array unknown see Call graph
authzAllow `plane: AccessPlane,
subject: string,
extra: { principal?: string; kind?: string; veraeUserId?: string } = {},` unknown see Call graph
natsStatement `customerId: string,
plane: AccessPlane = 'web',
veraeUserId?: string,` unknown see Call graph
natsAdjust `payload: {
customerId: string;
veraeUserId?: string;
cents: number;
reason: string;
agent: string;
kind?: string;
},
plane: AccessPlane = 'staff',` unknown see Call graph
natsPublish subject: string, payload: unknown, plane: AccessPlane = 'api' unknown see Call graph

Methods (class / object)

Name Parameters
void async (

What it imports / requires

No imports detected.

Call graph (identifiers invoked)

unset, nc, async, import, connect, split, encode, stringify, decode, parse, authzAllow, request, fetch, replace, json, natsStatement, natsAdjust, natsPublish, void, publish

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.