Milestone 3: NATS wait (gate 9), hash lookup, zappier timestamp, NS1 tunnel
Wait-via-NATS returns completed or pending+jobId (GATE 9). Mock SHA256
idempotent register + GET /hashes/{sha256}. Zappier commercial edge has
POST /v1/timestamp and hash-lookup. GATE 12 smoke (signup + wait) passes.
NS1 NATS is 127.0.0.1:4222 on 70.88.205.138; SSH tunnel :14222. Local
nats-server -js used for isolated tests. Activate app adds Echo Text.
Learned: JetStream on NS1 is loopback-only; do not bind 4222 public.
This commit is contained in:
parent
10c663cc0c
commit
51ae79b75f
75 changed files with 1114 additions and 123 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
**Package:** `verae-zapier-middleware`
|
||||
**Source:** `packages/verae-zapier-middleware/src/services/timestampService.js`
|
||||
**Lines:** 123
|
||||
**Lines:** 160
|
||||
|
||||
## What this module is
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ Implementation module in `verae-zapier-middleware`. The tables below are extract
|
|||
|
||||
## Exports
|
||||
|
||||
`createTimestamp`, `createTimestampAndWait`, `createBatchTimestamp`, `getJobStatus`, `getBatchJobStatus`, `getJobVerification`
|
||||
`createTimestamp`, `createTimestampAndWait`, `createBatchTimestamp`, `getJobStatus`, `getBatchJobStatus`, `getJobVerification`, `lookupHash`
|
||||
|
||||
## Types / interfaces / classes
|
||||
|
||||
|
|
@ -21,12 +21,13 @@ _None extracted._
|
|||
| Name | Parameters | Param types (JSDoc) | Returns | Calls (same file / helpers) |
|
||||
|------|------------|---------------------|---------|-----------------------------|
|
||||
| `enqueueWatchForJob` | `ctx, jobId` | ctx: `object`, jobId: `string` | `unknown` | see Call graph |
|
||||
| `createTimestamp` | `ctx, body` | ctx: `object` | `Promise<{ jobId: string ` — >} | see Call graph |
|
||||
| `createTimestamp` | `ctx, body` | ctx: `object` | `Promise<{ jobId: string, sha256?: string, existing?: boolean ` — >} | see Call graph |
|
||||
| `createTimestampAndWait` | `ctx, body` | ctx: `object` | `Promise<object>` — StatusResponse | see Call graph |
|
||||
| `createBatchTimestamp` | `ctx, body` | ctx: `object` | `unknown` | see Call graph |
|
||||
| `getJobStatus` | `ctx, jobId` | ctx: `object`, jobId: `string` | `unknown` | see Call graph |
|
||||
| `getBatchJobStatus` | `ctx, body` | ctx: `object` | `unknown` | see Call graph |
|
||||
| `getJobVerification` | `ctx, jobId` | ctx: `object`, jobId: `string` | `unknown` | see Call graph |
|
||||
| `lookupHash` | `ctx, sha256` | ctx: `object`, sha256: `string` | `unknown` | see Call graph |
|
||||
|
||||
## Methods (class / object)
|
||||
|
||||
|
|
@ -40,12 +41,12 @@ _None extracted._
|
|||
}` |
|
||||
| `checkEntitlement` | `ctx.tenantId, 'timestamp'` |
|
||||
| `recordUsage` | `ctx.tenantId, 'timestamp'` |
|
||||
| `recordUsage` | `ctx.tenantId, 'status'` |
|
||||
| `checkEntitlement` | `ctx.tenantId, 'batch_timestamp', { amount: itemCount }` |
|
||||
| `recordUsage` | `ctx.tenantId, 'batch_timestamp', { amount: itemCount }` |
|
||||
| `recordUsage` | `ctx.tenantId, 'status'` |
|
||||
| `recordUsage` | `ctx.tenantId, 'status', { amount: body.jobIds?.length ?? 1 }` |
|
||||
| `recordUsage` | `ctx.tenantId, 'status'` |
|
||||
| `recordUsage` | `ctx.tenantId, 'status'` |
|
||||
|
||||
## What it imports / requires
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ _None extracted._
|
|||
|
||||
## Call graph (identifiers invoked)
|
||||
|
||||
`createDebugger`, `enqueueWatchForJob`, `getTraceId`, `import`, `enqueueWatch`, `debug`, `enqueueJob`, `createTimestamp`, `checkEntitlement`, `recordUsage`, `createTimestampAndWait`, `waitForJob`, `createBatchTimestamp`, `getJobStatus`, `getStatus`, `getBatchJobStatus`, `getBatchStatus`, `getJobVerification`
|
||||
`createDebugger`, `enqueueWatchForJob`, `getTraceId`, `import`, `enqueueWatch`, `debug`, `enqueueJob`, `createTimestamp`, `checkEntitlement`, `recordUsage`, `createTimestampAndWait`, `waitForJobEvent`, `getStatus`, `waitForJob`, `createBatchTimestamp`, `getJobStatus`, `getBatchJobStatus`, `getBatchStatus`, `getJobVerification`, `lookupHash`
|
||||
|
||||
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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue