fn triggerCommands(commands: array, stopAtFirstFailure?: boolean)
Trigger ordered commands (POST /v1/commands/trigger/batch); per-item failures are recorded, not thrown. Not atomic
| Argument | Type | Required | Description |
|---|
| commands | array | yes | |
| stopAtFirstFailure? | boolean | no | |
fn ingestExternalEvents(events: array, stopAtFirstFailure?: boolean)
Ingest ordered external events (POST /v1/events/external/batch); per-item failures are recorded. Not atomic
| Argument | Type | Required | Description |
|---|
| events | array | yes | |
| stopAtFirstFailure? | boolean | no | Stop after a failure to avoid advancing a source watermark past it |
fn searchUsedTags(key: string, prefix?: string, limit?: number)
Discover distinct tag values by literal prefix (GET /v1/events/tags) within the token's event type and owner scope
| Argument | Type | Required | Description |
|---|
| key | string | yes | |
| prefix? | string | no | |
| limit? | number | no | |
fn triggerCommand(payload: record)
Trigger the token's command type (POST /v1/commands/trigger). A business rejection is recorded, not thrown
| Argument | Type | Required | Description |
|---|
| payload | record | yes | The command payload, as the command type's schema expects it |
fn dryRunCommand(payload: record)
Ask whether the token's command type would accept a payload, storing nothing (POST /v1/commands/dry-run)
| Argument | Type | Required | Description |
|---|
| payload | record | yes | The command payload to decide on without storing anything |
fn fetchEvents(after?: string, epoch?: string, correlationId?: string, upToSequence?: number, maxPages?: number)
Read the token's event type (GET /v1/events), following nextCursor up to maxPages
| Argument | Type | Required | Description |
|---|
| after? | string | no | Start after this cursor (a previous nextCursor, or a bare sequence) |
| epoch? | string | no | Database epoch the 'after' cursor was read in, if not inside it |
| correlationId? | string | no | Only return events with this correlation id |
| upToSequence? | number | no | Read history as known at this sequence, inclusive (SkilJ 0.3.0) |
| maxPages? | number | no | Follow nextCursor for up to this many pages |
fn consumeEvents(mode?: enum)
Serve the token's event type from its server-tracked cursor (GET /v1/events/consume); the cursor advances itself, nothing is passed back
| Argument | Type | Required | Description |
|---|
| mode? | enum | no | Server-tracked cursor mode: required on the token's first consume |
fn acknowledgeEvents(sequence: number, epoch?: string)
Advance a manual_ack consume cursor (POST /v1/events/consume/ack) up to a served sequence
| Argument | Type | Required | Description |
|---|
| sequence | number | yes | Advance a manual_ack cursor up to this served sequence |
| epoch? | string | no | Epoch from the consume response that served the sequence |
fn ingestExternalEvent(payload: record, sourceContent: string, sourceContext?: string, dedupe?: object)
Record an event from an outside system (POST /v1/events/external), deduplicated by Idempotency-Key or watermark
| Argument | Type | Required | Description |
|---|
| payload | record | yes | The external event payload |
| sourceContent | string | yes | The original message, verbatim, as received from the source |
| sourceContext? | string | no | Where the message came from, e.g. a topic or queue name |
| dedupe? | object | no | Watermark dedupe for an in-order source: partition and its sequence |
fn createDirectEvent(payload: record)
Store an event directly, bypassing any command (POST /v1/events/direct)
| Argument | Type | Required | Description |
|---|
| payload | record | yes | The event payload |
fn reportParkedDelivery(source: string, kind: enum, identifier: string, error: string, attemptCount: number, firstFailedAt: string, request: record, idempotencyKey?: string)
Report a broker delivery the bridge gave up retrying (POST /v1/parked-deliveries), for a later retryParkedDelivery
| Argument | Type | Required | Description |
|---|
| source | string | yes | The bridge's own name for itself, e.g. 'kafka-inbound' |
| kind | enum | yes | Which original route the delivery was bound for |
| identifier | string | yes | Broker-native message id, e.g. '{topic}:{partition}:{offset}' |
| error | string | yes | Why the bridge gave up retrying this delivery |
| attemptCount | number | yes | How many delivery attempts the bridge made |
| firstFailedAt | string | yes | ISO-8601 timestamp of the first failed attempt |
| request | record | yes | The verbatim original POST body for the delivery, in the shape the |
| idempotencyKey? | string | no | The Idempotency-Key header the original POST carried, if any - |
Resources
batchCommands(30d)— Ordered command outcomes, including per-item errors and pending approvals
batchEvents(30d)— Ordered external-event outcomes, including per-item errors
usedTags(30d)— Distinct used tag values visible to the event-read token
commandResult(infinite)— Outcome of a triggered or dry-run command
events(30d)— A page (or several) of events read with an EventRead token
consumedEvents(30d)— Events served from a server-tracked consume cursor with an EventRead token
ack(infinite)— Record of a manual_ack cursor acknowledgement
eventWrite(infinite)— Result of writing an external or direct event
parkedDelivery(infinite)— A bridge's parked-delivery report stored by SkilJ