Basic usage with static methods
Basic usage with static methods
import { Result } from "@qlever-llc/result"; function divide(a: number, b: number): Result<number, ValidationError> { if (b === 0) { return Result.err(new ValidationError("Division by zero")); } return Result.ok(a / b); } const result = divide(10, 2) .map(x => x * 2) .map(x => x + 1); const value = result.take(); if (Result.isErr(value)) return value; console.log(value); // 11
Async operations
Async operations
import { AsyncResult, Result } from "@qlever-llc/result"; const user = AsyncResult.try(async () => { const response = await fetch(`/api/users/123`); return await response.json(); }); const result = user .map(user => user.name) .map(name => name.toUpperCase()); const value = await result.take(); if (Result.isErr(value)) return value; console.log(value); // "ALICE"
An asynchronous Result class that represents a Promise of Result<T, E>.
-
all<T, E extends BaseError>(results: readonly (AsyncResult<T, E> | Promise<Result<T, E>>)[]): AsyncResult<T[], E>
Combines multiple AsyncResults into a single AsyncResult containing an array.
-
andThen<U, F extends BaseError>(fn: (value: T) => Result<U, F> | AsyncResult<U, F> | Promise<Result<U, F>>): AsyncResult<U, E | F>
Chains operations that return Results.
-
any<T, E extends BaseError>(results: readonly (AsyncResult<T, E> | Promise<Result<T, E>>)[]): AsyncResult<T, E>
Returns the first Ok result from an array of AsyncResults.
-
context(): AsyncResult<T, E>message: string,extra?: Record<string, unknown>
Adds context to an Err result for early returns. Async version - can be chained before take().
-
err<E extends BaseError, T = never>(error: E): AsyncResult<T, E>
Creates a failed AsyncResult with the given error.
-
from<T, E extends BaseError>(promise: Promise<Result<T, E>>): AsyncResult<T, E>
Creates an AsyncResult from a Promise of Result.
-
inspect(fn: (value: T) => void | Promise<void>): AsyncResult<T, E>
Performs a side effect on the Ok value without changing the result.
-
inspectErr(fn: (error: E) => void | Promise<void>): AsyncResult<T, E>
Performs a side effect on the Err value without changing the result.
-
lift<T, E extends BaseError>(value: Result<T, E> | AsyncResult<T, E> | Promise<Result<T, E>>): AsyncResult<T, E>
Creates an AsyncResult from a Result, AsyncResult, or Promise<Result>.
-
map<U>(fn: (value: T) => U): AsyncResult<U, E>
Transforms the Ok value using a mapper function, leaving Err untouched.
-
mapErr<F extends BaseError>(fn: (error: E) => F): AsyncResult<T, F>
Transforms the Err value using a mapper function, leaving Ok untouched.
-
match<U>(pattern: { ok: (value: T) => U; err: (error: E) => U; }): Promise<U>
Pattern matching for async Results.
-
ok<T, E extends BaseError = never>(value: T): AsyncResult<T, E>
Creates a successful AsyncResult with the given value.
-
or<U>(other: Result<U, E> | AsyncResult<U, E> | Promise<Result<U, E>>): AsyncResult<T | U, E>
Returns this result if Ok, otherwise returns the fallback.
-
orElse<U, F extends BaseError>(fn: (error: E) => Result<U, F> | AsyncResult<U, F> | Promise<Result<U, F>>): AsyncResult<T | U, F>
Returns this result if Ok, otherwise computes a fallback from the error.
-
orThrow(): Promise<T>
Returns the Ok value or throws the Err error.
-
take(): Promise<T | Result<never, E>>
Extracts the value from Ok or returns the Err for early returns.
-
then<TResult1 = Result<T, E>, TResult2 = never>(): Promise<TResult1 | TResult2>onfulfilled?:((value: Result<T, E>) => TResult1 | PromiseLike<TResult1>)
| null,onrejected?:((reason: unknown) => TResult2 | PromiseLike<TResult2>)
| nullImplements PromiseLike to make AsyncResult awaitable.
-
try<T>(): AsyncResult<T, UnexpectedError>fn: () => Promise<T>,context?: Record<string, unknown>
Wraps an async function that might throw into an AsyncResult.
-
unwrapOr<U>(defaultValue: U): Promise<T | U>
Returns the Ok value or a default value if Err.
-
unwrapOrElse<U>(fn: (error: E) => U): Promise<T | U>
Returns the Ok value or computes a default from the error.
Base class for all errors used in Result<T, E>.
-
baseSerializable(): BaseErrorSchema
Helper method to get base serializable fields. Subclasses should use this to build their complete serializable object.
-
getContext(): Record<string, unknown>
Get the current context object.
-
getTraceId(): string | undefined
Get the trace ID for this error. Returns the trace ID captured at error creation time.
-
id: string
Unique identifier for this error instance
-
name: string
Error type name (used for discrimination)
-
toJSON(): string
Serializes error to JSON string.
-
toSerializable(): TData
Serializes error to a plain object. Subclasses must implement this to return their specific data type.
-
traceIdGetter: (() => string | undefined) | undefined
Optional callback to provide a trace ID from ambient context (e.g. OpenTelemetry).
-
withContext(context?: Record<string, unknown>): this
Add contextual information to this error. Useful for adding runtime context like request IDs, user IDs, etc.
-
withTraceId(traceId: string | undefined): this
Attach a trace ID if one was not captured when the error was created.
A synchronous Result class that represents either success (Ok) or failure (Err).
-
_unsafeValue(): ResultValue<T, E>
Internal method to get the raw value (for testing/debugging). Not recommended for general use - prefer take() instead.
-
all<T, E extends BaseError>(results: readonly Result<T, E>[]): Result<T[], E>
Combines multiple Results into a single Result containing an array.
-
andThen<U, F extends BaseError>(fn: (value: T) => Result<U, F>): Result<U, E | F>
Chains operations that return Results (also known as flatMap).
-
any<T, E extends BaseError>(results: readonly Result<T, E>[]): Result<T, E>
Returns the first Ok result from an array of Results.
-
context(): Result<T, E>message: string,extra?: Record<string, unknown>
Adds context to an Err result for early returns. Chainable with take() for adding context when propagating errors.
-
err<E extends BaseError, T = never>(error: E): Result<T, E>
Creates a failed Result containing an error.
-
error(): E
Gets the error from an Err Result.
-
inspect(fn: (value: T) => void): Result<T, E>
Performs a side effect on the Ok value without changing the Result.
-
inspectErr(fn: (error: E) => void): Result<T, E>
Performs a side effect on the Err value without changing the Result.
-
isErr<T, E extends BaseError>(result: Result<T, E>): result is Result<never, E>
Type guard to check if a value is an Err Result.
-
isOk<T, E extends BaseError>(result: Result<T, E>): result is Result<T, never>
Type guard to check if a value is an Ok Result.
-
map<U>(fn: (value: T) => U): Result<U, E>
Transforms the Ok value using a mapper function, leaving Err untouched.
-
mapErr<F extends BaseError>(fn: (error: E) => F): Result<T, F>
Transforms the Err value using a mapper function, leaving Ok untouched.
-
match<U>(pattern: { ok: (value: T) => U; err: (error: E) => U; }): U
Pattern matching for Results - handle both Ok and Err cases.
-
ok<T, E extends BaseError = never>(value: T): Result<T, E>
Creates a successful Result containing a value.
-
or<U>(other: Result<U, E>): Result<T | U, E>
Returns this result if Ok, otherwise returns the fallback result.
-
orElse<U, F extends BaseError>(fn: (error: E) => Result<U, F>): Result<T | U, F>
Returns this result if Ok, otherwise computes a fallback from the error.
-
orThrow(): T
Returns the Ok value or throws the Err error.
-
take(): [T] extends [never] ? Result<never, E> : T | Result<never, E>
Extracts the value from Ok or returns the Err for early returns.
-
try<T>(): Result<T, UnexpectedError>fn: () => T,context?: Record<string, unknown>
Wraps a function that might throw into a Result.
-
unwrapOr<U>(defaultValue: U): T | U
Returns the Ok value or a default value if Err.
-
unwrapOrElse<U>(fn: (error: E) => U): T | U
Returns the Ok value or computes a default from the error.
Represents an unexpected error. Use this for wrapping unknown errors or for truly unexpected conditions.
- name: "UnexpectedError"
-
toSerializable(): UnexpectedErrorData
Serializes error to a plain object.
Extracts the Ok type T from a Result<T, E>.
Extracts the Err type E from a Result<T, E>.
A type that accepts either a Result or AsyncResult with the same T and E types.
Base error serialization schema. All errors serialize to this structure with optional additional fields.
Schema for UnexpectedError serialization.
Svelte-reactive adapter around a framework-neutral Trellis connection.
-
close(): Promise<void>
Closes the underlying Trellis runtime connection.
-
status(): TrellisConnectionStatus
Latest connection status, reactive when read by Svelte effects or markup.
Creates an app-scoped typed Svelte context owner for a Trellis contract and URL.
Resolves a Trellis app URL config to the string shape required by the client.
Public app-scoped typed Svelte context owner for a Trellis browser app.
-
contract: TContract
Contract used by this app context and by
TrellisProviderconnections. -
getConnection(): SvelteTrellisConnection
Returns a Svelte-reactive adapter for the real Trellis connection.
-
getTrellis(): TClient
Returns the contract-typed connected Trellis client from Svelte context synchronously.
-
trellisUrl: TrellisAppUrlResolver
Trellis URL configuration used by
TrellisProviderconnections.
Options used to create a Trellis Svelte app owner.
-
contract: TContract
Contract used by this app context and by
TrellisProviderconnections. -
trellisUrl: TrellisAppUrlResolver
Trellis URL, or a resolver for runtime-selected Trellis URLs.
Minimal branded app owner surface accepted by the Trellis Svelte provider.
URL value accepted by a Trellis Svelte app owner.
Trellis URL configuration for a Svelte app owner.
Real connected Trellis client type exposed by a Svelte app context.
Minimal client surface required for Trellis Svelte context clients.
Minimal contract shape required to create a typed Trellis Svelte app context.
Props accepted by the Svelte Trellis provider component.
Disposable helper that captures live decoded contract events in integration tests.
-
all(): ReadonlyArray<TrellisTestCapturedEvent<TContract, TSelectedEvent>>
Returns captured events, optionally filtered by event name.
-
clear(): void
Removes all events captured so far without stopping live listeners.
- listenerSignal(): AbortSignal
- record(event: TrellisTestCapturedEvent<TContract, TSelectedEvent>): void
-
stop(): Promise<void>
Stops live listeners and closes the synthetic capture client connection once.
-
waitFor<E extends TSelectedEvent>(): Promise<TrellisTestCapturedEvent<TContract, E>>name: E,predicate?: TrellisTestCapturedEventPredicate<TContract, E>,opts?: WaitForOptions
Waits for the first captured event with the requested name and optional predicate.
Runs an isolated Trellis control plane and NATS server for integration tests.
-
captureEvents<>(args: TrellisTestEventCaptureOptions<TContract, TEvents>): Promise<TrellisTestEventCapture<TContract, TEvents[number]>>TContract extends TrellisTestEventSourceContract,TEvents extends readonly EventName<TContract>[]
Captures live decoded contract events through a synthetic app participant.
-
clientAuth(key: TrellisTestClientKey): TrellisTestClientAuth
Returns auth options and admin-backed auth continuation for a registered app/client participant. Spread the result into
TrellisClient.connect(...). -
connectClient<TContract extends TrellisTestClientContract<TrellisAPI>>(args: ClientOpts): Promise<TrellisTestConnectedClient<TContract>>
& { name: string; contract: TContract; sessionKeySeed?: string; }Connects an app/client participant through the public generated client surface.
- contracts: { approve(args: { deployment?: string; contract: RuntimeContract; allowPlanClassifications?: readonly TrellisTestAuthorityPlanClassification[]; }): Promise<TrellisTestContractApproval>; }
- deployments: { create(args: { id?: string; mutableDev?: boolean; }): Promise<void>; reconcile(deployment: string): Promise<void>; waitReady(deployment: string): Promise<void>; }
-
drain(): Promise<void>
Drains the underlying NATS connection.
-
flush(): Promise<void>
Flushes the underlying NATS connection.
- natsUrl: string
-
registerClient(args: { name: string; contract: TrellisTestClientContract; sessionKeySeed?: string; }): Promise<TrellisTestClientKey>
Creates app/client session-key material for public
TrellisClient.connectcalls. -
registerService(args: { name: string; contract: RuntimeContract; deployment?: string; sessionKeySeed?: string; }): Promise<TrellisTestServiceKey>
Registers a service contract and creates a service instance key.
- services: { createInstance(args: { deployment?: string; name: string; contract: RuntimeContract; sessionKeySeed?: string; }): Promise<TrellisTestServiceKey>; }
-
sqliteMemoryUrl(): string
Returns the SQLite in-memory URL used by service-owned tests.
-
start(options: TrellisTestRuntimeStartOptions): Promise<TrellisTestRuntime>
Starts an isolated Trellis test runtime.
-
stop(): Promise<void>
Stops clients, control plane, NATS, and the temp directory.
-
tempSqlitePath(name?: string): Promise<string>
Returns a service-owned SQLite path under this runtime workdir.
- trellisUrl: string
-
waitFor<T>(): Promise<T>fn: () =>T
| null
| undefined
| false
| Promise<T | null | undefined | false>,opts?: WaitForOptionsPolls until
fnreturns a truthy value. - workdir: string
Validates standard Trellis captured-event context metadata and returns the event.
Waits for a captured event and fails with captured-event context when it is absent.
| { readonly id?: string; wait(): TrellisTestTerminalWaitResult<TTerminal>; },
Asserts that a job reference or terminal job completed successfully.
Asserts that no matching event has been captured so far.
| TrellisTestAssertNoEventDuringOptions
| undefined,
Asserts that no matching event is captured during an explicit observation window.
| TrellisTestWaitableOperation<TProgress, TOutput>,
& { state: "completed"; }
Asserts that an operation reference or terminal operation completed successfully.
Asserts that a Trellis RPC-style result is Err and returns the error.
Polls a Trellis RPC-style call until it returns Ok and optional expected output matches.
Asserts that a Trellis RPC-style result is Ok and returns the Ok value.
Returns the SQLite in-memory URL used by service-owned tests.
Returns a fresh path suitable for a service-owned SQLite database.
| null
| undefined
| false
| Promise<T | null | undefined | false>,
Polls until fn returns a truthy value, preserving the last thrown error on timeout.
Options for assertEventsCaptured.
Minimal captured-event shape accepted by the generic event assertion helpers.
-
context: unknown
Trellis listener metadata for the captured event.
-
event: TEventName
Contract event name captured by the test listener.
-
payload: TPayload
Decoded event payload.
-
receivedAt: unknown
Wall-clock time when the test capture observed the event.
Structural event capture accepted by Trellis test event assertion helpers.
-
all(): ReadonlyArray<TEvent>
Returns events captured so far in capture order.
Predicate used by event assertion helpers to select a captured event.
Options for assertNoEventDuring.
-
durationMs: number
Duration to observe for newly captured events.
-
intervalMs: number
Poll interval while observing. Defaults to 10ms.
Options for assertRpcEventuallyOk.
A decoded contract event observed by a TrellisTestEventCapture.
Transport-neutral listener metadata captured with a test event.
-
id: string
Stable event id from the Trellis event header.
-
mode: "ephemeral"
Runtime listener mode that delivered the event.
-
time: Date
Event creation time from the Trellis event header.
Expected captured event context fields for assertCapturedEventContext.
-
id: string
Expected Trellis event id.
-
mode: "ephemeral"
Expected listener mode. Defaults to
ephemeral. -
receivedAt: Date
Expected capture receipt time.
-
time: Date
Expected Trellis event creation time.
Predicate used by TrellisTestEventCapture.waitFor.
Authentication options for connecting a test app/client participant.
Contract value accepted by app/client helpers.
Session-key material returned for a registered app/client participant.
& { API: { trellis: ApiForTestClientContract<TContract>; }; }
Connected app/client type returned by TrellisTestRuntime.connectClient.
Contract value accepted by the Trellis test runtime.
Result returned when a contract authority plan is approved by the test runtime.
Recursive subset expectation used by Trellis test assertion helpers.
& { readonly name: string; }
Error constructor or class object accepted by assertRpcErr.
Captured-event variant selected by event name when the event type is a union.
& { name: string; contract: TContract; events: TEvents; }
Options for starting a live decoded contract event capture.
Event expectation accepted by assertEventsCaptured.
Event expectation object accepted by assertEventsCaptured.
Contract value accepted by TrellisTestRuntime.captureEvents.
Minimal terminal job snapshot accepted by assertJobCompleted.
-
id: string
Trellis job id, when available from the source snapshot.
-
result: TResult
Job result payload, present for completed jobs that produce a result.
-
state: string
Terminal job state.
Generated-style wait result exposing an orThrow() terminal unwrap.
-
orThrow(): MaybePromise<TTerminal>
Returns the terminal snapshot or throws the underlying failure.
Options for starting an isolated Trellis test runtime.
Session-key material returned for a registered service.
| TrellisTestOrThrowWaitResult<TTerminal>
| Promise<TrellisTestOrThrowWaitResult<TTerminal> | TTerminal>
| TTerminal
Wait result shape accepted by terminal job and operation assertions.
Structural Trellis job reference accepted by assertJobCompleted.
-
id: string
Trellis job id, when available from the source reference.
-
wait(): TrellisTestTerminalWaitResult<TrellisTestJobTerminal<TResult>>
Waits for the job to reach a terminal state.
Structural Trellis operation reference accepted by assertOperationCompleted.
-
wait(): TrellisTestTerminalWaitResult<TerminalOperation<TProgress, TOutput>>
Waits for the operation to reach a terminal state.
| null
| undefined
| false
| Promise<T | null | undefined | false>,
Wait polling function accepted by eventual Trellis test assertion helpers.
| { readonly waitFor: TrellisTestWaitForFunction; }
Runtime-like object accepted by eventual Trellis test assertion helpers.
Polling options for waitFor and runtime readiness helpers.
- cancelled(): boolean
- context: Readonly<JobContext>
- heartbeat(): AsyncResult<void, BaseError>
- isRedelivery(): boolean
- log(entry: JobLogEntry): AsyncResult<void, BaseError>
- payload: TPayload
- progress(value: JobProgress): AsyncResult<void, BaseError>
- redeliveryCount(): number
- ref: JobRef<TPayload, TResult>
An asynchronous Result class that represents a Promise of Result<T, E>.
-
all<T, E extends BaseError>(results: readonly (AsyncResult<T, E> | Promise<Result<T, E>>)[]): AsyncResult<T[], E>
Combines multiple AsyncResults into a single AsyncResult containing an array.
-
andThen<U, F extends BaseError>(fn: (value: T) => Result<U, F> | AsyncResult<U, F> | Promise<Result<U, F>>): AsyncResult<U, E | F>
Chains operations that return Results.
-
any<T, E extends BaseError>(results: readonly (AsyncResult<T, E> | Promise<Result<T, E>>)[]): AsyncResult<T, E>
Returns the first Ok result from an array of AsyncResults.
-
context(): AsyncResult<T, E>message: string,extra?: Record<string, unknown>
Adds context to an Err result for early returns. Async version - can be chained before take().
-
err<E extends BaseError, T = never>(error: E): AsyncResult<T, E>
Creates a failed AsyncResult with the given error.
-
from<T, E extends BaseError>(promise: Promise<Result<T, E>>): AsyncResult<T, E>
Creates an AsyncResult from a Promise of Result.
-
inspect(fn: (value: T) => void | Promise<void>): AsyncResult<T, E>
Performs a side effect on the Ok value without changing the result.
-
inspectErr(fn: (error: E) => void | Promise<void>): AsyncResult<T, E>
Performs a side effect on the Err value without changing the result.
-
lift<T, E extends BaseError>(value: Result<T, E> | AsyncResult<T, E> | Promise<Result<T, E>>): AsyncResult<T, E>
Creates an AsyncResult from a Result, AsyncResult, or Promise<Result>.
-
map<U>(fn: (value: T) => U): AsyncResult<U, E>
Transforms the Ok value using a mapper function, leaving Err untouched.
-
mapErr<F extends BaseError>(fn: (error: E) => F): AsyncResult<T, F>
Transforms the Err value using a mapper function, leaving Ok untouched.
-
match<U>(pattern: { ok: (value: T) => U; err: (error: E) => U; }): Promise<U>
Pattern matching for async Results.
-
ok<T, E extends BaseError = never>(value: T): AsyncResult<T, E>
Creates a successful AsyncResult with the given value.
-
or<U>(other: Result<U, E> | AsyncResult<U, E> | Promise<Result<U, E>>): AsyncResult<T | U, E>
Returns this result if Ok, otherwise returns the fallback.
-
orElse<U, F extends BaseError>(fn: (error: E) => Result<U, F> | AsyncResult<U, F> | Promise<Result<U, F>>): AsyncResult<T | U, F>
Returns this result if Ok, otherwise computes a fallback from the error.
-
orThrow(): Promise<T>
Returns the Ok value or throws the Err error.
-
take(): Promise<T | Result<never, E>>
Extracts the value from Ok or returns the Err for early returns.
-
then<TResult1 = Result<T, E>, TResult2 = never>(): Promise<TResult1 | TResult2>onfulfilled?:((value: Result<T, E>) => TResult1 | PromiseLike<TResult1>)
| null,onrejected?:((reason: unknown) => TResult2 | PromiseLike<TResult2>)
| nullImplements PromiseLike to make AsyncResult awaitable.
-
try<T>(): AsyncResult<T, UnexpectedError>fn: () => Promise<T>,context?: Record<string, unknown>
Wraps an async function that might throw into an AsyncResult.
-
unwrapOr<U>(defaultValue: U): Promise<T | U>
Returns the Ok value or a default value if Err.
-
unwrapOrElse<U>(fn: (error: E) => U): Promise<T | U>
Returns the Ok value or computes a default from the error.
& { reason: AuthErrorData["reason"]; message?: string; context?: Record<string, unknown>; id?: string; }
Error for authentication and authorization failures.
- name: "AuthError"
- reason: AuthErrorData["reason"]
-
toSerializable(): AuthErrorData
Serializes error to a plain object.
Base class for all errors used in Result<T, E>.
-
baseSerializable(): BaseErrorSchema
Helper method to get base serializable fields. Subclasses should use this to build their complete serializable object.
-
getContext(): Record<string, unknown>
Get the current context object.
-
getTraceId(): string | undefined
Get the trace ID for this error. Returns the trace ID captured at error creation time.
-
id: string
Unique identifier for this error instance
-
name: string
Error type name (used for discrimination)
-
toJSON(): string
Serializes error to JSON string.
-
toSerializable(): TData
Serializes error to a plain object. Subclasses must implement this to return their specific data type.
-
traceIdGetter: (() => string | undefined) | undefined
Optional callback to provide a trace ID from ambient context (e.g. OpenTelemetry).
-
withContext(context?: Record<string, unknown>): this
Add contextual information to this error. Useful for adding runtime context like request IDs, user IDs, etc.
-
withTraceId(traceId: string | undefined): this
Attach a trace ID if one was not captured when the error was created.
Error raised when client authentication was delegated to caller-owned routing.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (job: ActiveJob<TPayload, TResult>) => Promise<Result<TResult, BaseError>>): void
-
submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Submits a job using queue policy outcomes for keyed queues. Unkeyed queues accept and return a new job reference.
& { operation?: string; context?: Record<string, unknown>; id?: string; }
Error for KV storage operations. Used when key-value store operations fail.
- name: "KVError"
- operation: string
-
toSerializable(): KVErrorData
Serializes error to a plain object.
& { operationId: string; state?: string; operation?: string; service?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a Trellis operation lifecycle mutation targets a terminal operation.
- name: "OperationAlreadyTerminalError"
- operation: string
- operationId: string
- service: string
- state: string
-
toSerializable(): OperationAlreadyTerminalErrorData
Serializes error to a plain object.
- input(input: TInput): TDesc["transfer"] extends undefined ? OperationInputBuilder<TDesc, TProgress, TOutput> : TransferCapableOperationInputBuilder<TDesc, TProgress, TOutput>
- resume(ref: OperationRefData): OperationRef<TDesc, TProgress, TOutput>
-
start(): AsyncResult<input: TInput,callbacks?: OperationObserverCallbacks<TProgress, TOutput>>OperationRef<TDesc, TProgress, TOutput>,OperationControlError | UnexpectedError
& { operationId: string; expectedService: string; expectedOperation: string; actualService?: string; actualOperation?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a Trellis operation id belongs to a different service or operation.
& { operationId: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a requested Trellis operation id cannot be found.
- name: "OperationNotFoundError"
- operationId: string
-
toSerializable(): OperationNotFoundErrorData
Serializes error to a plain object.
& { error: TransportableTrellisErrorData; context?: Record<string, unknown>; id?: string; }
Error for wrapping errors received from remote Trellis services. This is the only error type with parseJSON/parseObject methods for deserializing remote errors.
- name: "RemoteError"
-
parse(data: unknown): Result<>TransportableTrellisErrorData,ValidationError | UnexpectedError
Parses and validates a plain object as TrellisErrorData. Use this to deserialize errors received from remote services.
-
parseJSON
Alias for parse() - parses JSON string or object as TrellisErrorData.
- remoteError: TransportableTrellisErrorData
-
toSerializable(): RemoteErrorData
Serializes error to a plain object.
A synchronous Result class that represents either success (Ok) or failure (Err).
-
_unsafeValue(): ResultValue<T, E>
Internal method to get the raw value (for testing/debugging). Not recommended for general use - prefer take() instead.
-
all<T, E extends BaseError>(results: readonly Result<T, E>[]): Result<T[], E>
Combines multiple Results into a single Result containing an array.
-
andThen<U, F extends BaseError>(fn: (value: T) => Result<U, F>): Result<U, E | F>
Chains operations that return Results (also known as flatMap).
-
any<T, E extends BaseError>(results: readonly Result<T, E>[]): Result<T, E>
Returns the first Ok result from an array of Results.
-
context(): Result<T, E>message: string,extra?: Record<string, unknown>
Adds context to an Err result for early returns. Chainable with take() for adding context when propagating errors.
-
err<E extends BaseError, T = never>(error: E): Result<T, E>
Creates a failed Result containing an error.
-
error(): E
Gets the error from an Err Result.
-
inspect(fn: (value: T) => void): Result<T, E>
Performs a side effect on the Ok value without changing the Result.
-
inspectErr(fn: (error: E) => void): Result<T, E>
Performs a side effect on the Err value without changing the Result.
-
isErr<T, E extends BaseError>(result: Result<T, E>): result is Result<never, E>
Type guard to check if a value is an Err Result.
-
isOk<T, E extends BaseError>(result: Result<T, E>): result is Result<T, never>
Type guard to check if a value is an Ok Result.
-
map<U>(fn: (value: T) => U): Result<U, E>
Transforms the Ok value using a mapper function, leaving Err untouched.
-
mapErr<F extends BaseError>(fn: (error: E) => F): Result<T, F>
Transforms the Err value using a mapper function, leaving Ok untouched.
-
match<U>(pattern: { ok: (value: T) => U; err: (error: E) => U; }): U
Pattern matching for Results - handle both Ok and Err cases.
-
ok<T, E extends BaseError = never>(value: T): Result<T, E>
Creates a successful Result containing a value.
-
or<U>(other: Result<U, E>): Result<T | U, E>
Returns this result if Ok, otherwise returns the fallback result.
-
orElse<U, F extends BaseError>(fn: (error: E) => Result<U, F>): Result<T | U, F>
Returns this result if Ok, otherwise computes a fallback from the error.
-
orThrow(): T
Returns the Ok value or throws the Err error.
-
take(): [T] extends [never] ? Result<never, E> : T | Result<never, E>
Extracts the value from Ok or returns the Err for early returns.
-
try<T>(): Result<T, UnexpectedError>fn: () => T,context?: Record<string, unknown>
Wraps a function that might throw into a Result.
-
unwrapOr<U>(defaultValue: U): T | U
Returns the Ok value or a default value if Err.
-
unwrapOrElse<U>(fn: (error: E) => U): T | U
Returns the Ok value or computes a default from the error.
-
add(): () => voidname: string,check: ServiceHealthCheckFn
- checks(): Promise<HealthCheckResult[]>
- contractDigest: string
- contractId: string
- heartbeat(): Promise<HealthHeartbeat>
- instanceId: string
- kind: HealthHeartbeat["service"]["kind"]
- publishIntervalMs: number
- response(): Promise<HealthResponse>
- serviceName: string
- setInfo(info: ServiceHealthInfo | ServiceHealthInfoFn): void
- startedAt: string
Framework-neutral Trellis connection lifecycle handle.
-
close(): Promise<void>
Closes the underlying transport and publishes a terminal closed status.
-
setStatus(status: TrellisConnectionStatus): void
Publishes a new status to all active listeners.
-
status(): TrellisConnectionStatus
Returns the latest observed connection status.
-
stopObserving(): void
Stops status observation without closing the underlying transport.
-
subscribe(listener: TrellisConnectionStatusListener): () => void
Subscribes to status changes and immediately delivers the current status.
Abstract base class for Trellis errors. Trellis errors automatically include traceId when initTelemetry() has been called and a span is active in the current context.
-
create<S extends TSchema>(): AsyncResult<TypedKVEntry<S>, ValidationError>schema: S,kv: KV,entry: KvEntry
- createdAt()
- delete(vcc?: boolean): AsyncResult<void, KVError>
- key()
-
merge(): AsyncResult<void, KVError | ValidationError>value: unknown,vcc?: boolean
-
put(): AsyncResult<void, KVError>value: unknown,vcc?: boolean
- revision()
- value(): StaticDecode<S>
-
watch(): Promise<() => void>callback: (event: WatchEvent<S>) => void,opts?: WatchOptions
Watch this KV entry for changes.
Represents an unexpected error. Use this for wrapping unknown errors or for truly unexpected conditions.
- name: "UnexpectedError"
-
toSerializable(): UnexpectedErrorData
Serializes error to a plain object.
& { errors: Iterable<ValidationErrorInput>; context?: Record<string, unknown>; id?: string; }
Error for data validation failures. Includes schema validation and missing required data.
- name: "ValidationError"
-
toSerializable(): ValidationErrorData
Serializes error to a plain object. Transforms internal errors array to issues array for serialization.
Builds a CursorPage from items and an optional next cursor.
Builds a PageResponse from a pre-sliced offset page.
Create a schema for a cursor page response with typed items.
Define a transportable Trellis error class from a payload-object schema.
Canonicalizes JSON and computes its SHA-256 base64url digest.
Validates and normalizes a cursor pagination query.
Validates and normalizes an offset pagination query.
Create a schema for a bounded page response with typed entries.
Runs all health checks and returns an aggregated health response.
Runs a single health check and returns the result.
-
onTransfer(handler: NonNullable<>): TransferOperationBuilder<TDesc, TProgress, TOutput>OperationObserverCallbacks<TProgress, TOutput>["onTransfer"]
-
start(callbacks?: OperationObserverCallbacks<TProgress, TOutput>): AsyncResult<>StartedTransfer<TDesc, TProgress, TOutput>,OperationControlError | UnexpectedError | TransferError
- log: LoggerLike
-
name: string
Logical name for this client instance (used for logs and consumer names). Defaults to "client".
- noResponderRetry: NoResponderRetryOpts
- stream: string
- timeout: number
Public client-side surface returned by TrellisClient.connect.
- api: TA
- connection: TrellisConnection
- event: ActiveEventFacade<TA>
- feed: ActiveFeedFacade<TA>
- handle: { readonly rpc: ActiveRpcHandleFacade<TA, TRequests>; }
- name: string
- operation: ActiveOperationFacade<TA>
-
prepare<E extends EventsOf<TA>>(): Result<event: E,data: EventPayloadOf<TA, E>>PreparedTrellisEvent<EventPayloadOf<TA, E>>,ValidationError | UnexpectedError
-
publish<E extends EventsOf<TA>>(): AsyncResult<void, ValidationError | UnexpectedError>event: E,data: EventPayloadOf<TA, E>
- publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
-
request<M extends RequestMethodOf<TRequests>>(): AsyncResult<RequestOutputOf<TRequests, M>, BaseError>method: M,input: RequestInputOf<TRequests, M>,opts?: RequestOpts
- rpc: ActiveRpcFacade<TA>
- state: StateFacade<TState>
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
- CONTRACT_MODULE_METADATA: ContractModule<TContractId, TApi, ApiShape, ApiShape>
- contract: TContractId
- events: { publish?: UseEventsPublish<TSpec>; subscribe?: UseEventsSubscribe<TSpec>; }
- feeds: { subscribe?: UseFeedsSubscribe<TSpec>; }
- operations: { call?: UseOperationsCall<TSpec>; }
- rpc: { call?: UseRpcCall<TSpec>; }
Cursor pagination response with typed items.
Cursor pagination response metadata.
Cursor pagination query.
Options for normalizing a cursor pagination query.
-
defaultLimit: number
Limit used when the query does not specify one. Defaults to
100. -
maxLimit: number
Maximum accepted limit. Defaults to
500.
| undefined
| undefined
| undefined
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: TErrors
- eventConsumers: ContractSourceEventConsumers
- events: TEvents
- exports: ContractSourceExports<SchemaNameOf<TSchemas>>
-
feeds: Readonly<>Record<>string,ContractSourceFeed<SchemaNameOf<TSchemas>, CapabilityRef<TCapabilities>>
- id: string
- jobs: ContractSourceJobs<SchemaNameOf<TSchemas>>
- kind: ContractKind
- operations: TOperations
- resources: ContractSourceResources<SchemaNameOf<TSchemas>>
- rpc: TRpc
- schemas: TSchemas
- state: ContractSourceState<SchemaNameOf<TSchemas>>
- uses: TUses
Context provided to event listener callbacks.
-
group: string
Durable event consumer group, when delivered through a group.
-
id: string
Stable event id from the Trellis event header.
-
mode: "durable" | "ephemeral"
Runtime listener mode that delivered the event.
-
sequence: number
JetStream sequence number, when available.
-
subject: string
NATS subject that delivered the event.
-
time: Date
Event creation time from the Trellis event header.
- durableName: string
-
group: string
Contract event consumer group to use for durable service listeners when an event is declared in more than one group.
- mode: "durable" | "ephemeral"
- replay: "all" | "new"
- signal: AbortSignal
- event: ActiveEventPublishFacade<TA>
- feed: ActiveFeedFacade<TA>
- operation: ActiveOperationFacade<TA>
-
prepare(): Result<PreparedTrellisEvent, ValidationError | UnexpectedError>event: string,data: Record<string, unknown>
-
publish(): AsyncResult<void, ValidationError | UnexpectedError>event: string,data: Record<string, unknown>
- publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
-
request<M extends RequestMethodOf<TRequests>>(): AsyncResult<RequestOutputOf<TRequests, M>, BaseError>method: M,input: RequestInputOf<TRequests, M>,opts?: RequestOpts
- rpc: ActiveRpcFacade<TA>
-
stopEventListeners(): void
Stops durable event listener loops owned by this handler runtime.
A health check function that returns a Result indicating health status.
Result of a single health check.
-
error: string
Error message if the check failed with an error
-
info: Record<string, JsonValue>
Optional structured metadata for the check
-
latencyMs: number
Time in milliseconds the check took to execute
-
name: string
Name of the health check
-
status: "ok" | "failed"
Status of the check: "ok" if passed, "failed" if not
-
summary: string
Optional short human-readable summary
- checks: HealthCheckResult[]
- service: { name: string; kind: "service" | "device"; instanceId: string; contractId: string; contractDigest: string; startedAt: string; publishIntervalMs: number; runtime: "deno" | "node" | "rust" | "unknown"; runtimeVersion?: string; version?: string; info?: Record<string, JsonValue>; }
- status: HealthResponse["status"]
- summary: string
Aggregated health response for a service.
-
checks: HealthCheckResult[]
Individual health check results
-
service: string
Name of the service
-
status: "healthy" | "unhealthy" | "degraded"
Overall status: "healthy" if all pass, "unhealthy" if all fail, "degraded" if mixed
-
timestamp: string
ISO timestamp of when the health check was performed
| StateMigrationRequiredEntry<MapStateEntry<unknown>>
-
delete(): AsyncResult<{ deleted: boolean; }, BaseError>key: string,opts?: StateDeleteOptions
-
get(key: string): AsyncResult<>StateGetResult<{ kind: "map"; value: TValue; }>,BaseError
-
list(opts?: StateListOptions): AsyncResult<>{ entries: Array<>; count: number; offset: number; limit: number; nextOffset?: number; },MapStateEntry<TValue>
| StateMigrationRequiredEntry<MapStateEntry<unknown>>BaseError - prefix(path: string): MapStateStoreClient<TValue>
-
put(): AsyncResult<key: string,value: TValue,opts?: StatePutOptions>StatePutResult<{ kind: "map"; value: TValue; }>,BaseError
A type that accepts either a Result or AsyncResult with the same T and E types.
Cursor query after defaults and validation have been applied.
Errors returned when an operation control request fails before producing a snapshot or ack.
| OperationAlreadyTerminalError
| OperationMismatchError
Errors returned when an operation control request violates lifecycle state.
- onAccepted: (event: AcceptedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onCancelled: (event: CancelledOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onCompleted: (event: CompletedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onEvent: (event: OperationEvent<TProgress, TOutput>) => void | Promise<void>
- onFailed: (event: FailedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onProgress: (event: ProgressOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onStarted: (event: StartedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onTransfer: (event: TransferOperationEvent<TProgress, TOutput>) => void | Promise<void>
-
cancel(): AsyncResult<>OperationSnapshot<TProgress, TOutput>,OperationControlError | UnexpectedError
-
get(): AsyncResult<>OperationSnapshot<TProgress, TOutput>,OperationControlError | UnexpectedError
- id: string
- operation: string
- service: string
-
signal(): AsyncResult<signal: string,input?: unknown>OperationSignalAck<TProgress, TOutput>,OperationControlError | UnexpectedError
-
wait(): AsyncResult<>TerminalOperation<TProgress, TOutput>,OperationControlError | UnexpectedError
-
watch(): AsyncResult<>AsyncIterable<OperationEvent<TProgress, TOutput>>,OperationControlError | UnexpectedError
- accept(args: { sessionKey: string; }): AsyncResult<AcceptedOperation<TProgress, TOutput>, UnexpectedError>
-
control(operationId: string): AsyncResult<OperationRuntimeHandle<TProgress, TOutput>, BaseError>
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
- handle(handler: (context: OperationHandlerContext<TInput, TProgress, TOutput, TTransfer>) => unknown | Promise<unknown>): Promise<void>
- attach(job: { wait(): AsyncResult<unknown, BaseError>; }): AsyncResult<RuntimeOperationSnapshot, BaseError>
- cancel(): AsyncResult<RuntimeOperationSnapshot, BaseError>
- complete(value: TOutput): AsyncResult<RuntimeOperationSnapshot, BaseError>
- defer(): OperationDeferred
- fail(error: BaseError): AsyncResult<RuntimeOperationSnapshot, BaseError>
- id: string
- nextSignal(name?: string): AsyncResult<RuntimeOperationSignal, BaseError>
- progress(value: TProgress): AsyncResult<RuntimeOperationSnapshot, BaseError>
- signals(): AsyncIterable<RuntimeOperationSignal>
- started(): AsyncResult<RuntimeOperationSnapshot, BaseError>
Bounded pagination request.
Bounded pagination response with typed entries.
A fully encoded event whose subject, payload, and headers are stable.
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: Record<string, ContractErrorDecl>
- eventConsumers: ContractEventConsumers
- events: Record<string, ContractEvent>
- exports: ContractExports
- feeds: Record<string, ContractFeed>
- format: CONTRACT_FORMAT_V1
- id: string
- jobs: ContractJobs
- kind: ContractKind
- operations: Record<string, ContractOperation>
- resources: ContractResources
- rpc: Record<string, ContractRpcMethod>
- schemas: ContractSchemas
- state: ContractState
- uses: ContractUses
- api: TApi
- connection: TrellisConnection
- event: DeviceRuntime<TApi, TState>["event"]
- health: ServiceHealth
- name: string
- operation: DeviceRuntime<TApi, TState>["operation"]
- publish: DeviceRuntime<TApi, TState>["publish"]
- request: DeviceRuntime<TApi, TState>["request"]
- state: DeviceRuntime<TApi, TState>["state"]
- stream: string
- timeout: number
- transfer: { (grant: SendTransferGrant): SendTransferHandle; (grant: ReceiveTransferGrant): ReceiveTransferHandle; }
Runtime metadata assigned to every Trellis event message.
Event body plus Trellis runtime event metadata.
- events: { publish?: readonly StringKeyOf<TApi["events"]>[]; subscribe?: readonly StringKeyOf<TApi["events"]>[]; }
- feeds: { subscribe?: readonly StringKeyOf<NonNullable<TApi["feeds"]>>[]; }
- operations: { call?: readonly StringKeyOf<TApi["operations"]>[]; }
- rpc: { call?: readonly StringKeyOf<TApi["rpc"]>[]; }
Options for the watch() method.
-
includeDeletes: boolean
If true, include delete events in the watch stream. Defaults to false.
Schema for cursor pagination response metadata.
Schema for a cursor pagination query.
Schema for a bounded pagination request.
Returns the raw global capability keys required by an approval.
Builds the canonical value signed for NATS runtime-auth tokens.
-
expiresAt: number | Date
Expiry for remembered keys, as epoch milliseconds or a Date.
-
persistence: SessionKeyPersistenceMode
Defaults to remembered IndexedDB storage.
-
ttlMs: number
Relative expiry for remembered keys. Ignored when expiresAt is set.
- bindFlowSig: (flowId: string) => Promise<string>
-
createProof: () => Promise<string>subject: string,payloadHash: Uint8Array,requestId?: string,iat?: number
- currentIat: () => number
- natsConnectOptions: (opts: { contractDigest: string; }) => Promise<NatsConnectOptions>
-
natsConnectSigForIat: () => Promise<string>iat: number,contractDigest: string
-
oauthInitSig: () => Promise<string>redirectTo: string,context?: unknown,provider?: string,contract?: Record<string, unknown>
- sessionKey: string
- setServerClockOffsetMs: (clockOffsetMs: number) => void
- sign: (data: Uint8Array) => Promise<Uint8Array>
Returns the raw global capability keys required by an approval.
-
expiresAt: number | Date
Expiry for remembered keys, as epoch milliseconds or a Date.
-
persistence: SessionKeyPersistenceMode
Defaults to remembered IndexedDB storage.
-
ttlMs: number
Relative expiry for remembered keys. Ignored when expiresAt is set.
An asynchronous Result class that represents a Promise of Result<T, E>.
-
all<T, E extends BaseError>(results: readonly (AsyncResult<T, E> | Promise<Result<T, E>>)[]): AsyncResult<T[], E>
Combines multiple AsyncResults into a single AsyncResult containing an array.
-
andThen<U, F extends BaseError>(fn: (value: T) => Result<U, F> | AsyncResult<U, F> | Promise<Result<U, F>>): AsyncResult<U, E | F>
Chains operations that return Results.
-
any<T, E extends BaseError>(results: readonly (AsyncResult<T, E> | Promise<Result<T, E>>)[]): AsyncResult<T, E>
Returns the first Ok result from an array of AsyncResults.
-
context(): AsyncResult<T, E>message: string,extra?: Record<string, unknown>
Adds context to an Err result for early returns. Async version - can be chained before take().
-
err<E extends BaseError, T = never>(error: E): AsyncResult<T, E>
Creates a failed AsyncResult with the given error.
-
from<T, E extends BaseError>(promise: Promise<Result<T, E>>): AsyncResult<T, E>
Creates an AsyncResult from a Promise of Result.
-
inspect(fn: (value: T) => void | Promise<void>): AsyncResult<T, E>
Performs a side effect on the Ok value without changing the result.
-
inspectErr(fn: (error: E) => void | Promise<void>): AsyncResult<T, E>
Performs a side effect on the Err value without changing the result.
-
lift<T, E extends BaseError>(value: Result<T, E> | AsyncResult<T, E> | Promise<Result<T, E>>): AsyncResult<T, E>
Creates an AsyncResult from a Result, AsyncResult, or Promise<Result>.
-
map<U>(fn: (value: T) => U): AsyncResult<U, E>
Transforms the Ok value using a mapper function, leaving Err untouched.
-
mapErr<F extends BaseError>(fn: (error: E) => F): AsyncResult<T, F>
Transforms the Err value using a mapper function, leaving Ok untouched.
-
match<U>(pattern: { ok: (value: T) => U; err: (error: E) => U; }): Promise<U>
Pattern matching for async Results.
-
ok<T, E extends BaseError = never>(value: T): AsyncResult<T, E>
Creates a successful AsyncResult with the given value.
-
or<U>(other: Result<U, E> | AsyncResult<U, E> | Promise<Result<U, E>>): AsyncResult<T | U, E>
Returns this result if Ok, otherwise returns the fallback.
-
orElse<U, F extends BaseError>(fn: (error: E) => Result<U, F> | AsyncResult<U, F> | Promise<Result<U, F>>): AsyncResult<T | U, F>
Returns this result if Ok, otherwise computes a fallback from the error.
-
orThrow(): Promise<T>
Returns the Ok value or throws the Err error.
-
take(): Promise<T | Result<never, E>>
Extracts the value from Ok or returns the Err for early returns.
-
then<TResult1 = Result<T, E>, TResult2 = never>(): Promise<TResult1 | TResult2>onfulfilled?:((value: Result<T, E>) => TResult1 | PromiseLike<TResult1>)
| null,onrejected?:((reason: unknown) => TResult2 | PromiseLike<TResult2>)
| nullImplements PromiseLike to make AsyncResult awaitable.
-
try<T>(): AsyncResult<T, UnexpectedError>fn: () => Promise<T>,context?: Record<string, unknown>
Wraps an async function that might throw into an AsyncResult.
-
unwrapOr<U>(defaultValue: U): Promise<T | U>
Returns the Ok value or a default value if Err.
-
unwrapOrElse<U>(fn: (error: E) => U): Promise<T | U>
Returns the Ok value or computes a default from the error.
& { reason: AuthErrorData["reason"]; message?: string; context?: Record<string, unknown>; id?: string; }
Error for authentication and authorization failures.
- name: "AuthError"
- reason: AuthErrorData["reason"]
-
toSerializable(): AuthErrorData
Serializes error to a plain object.
Base class for all errors used in Result<T, E>.
-
baseSerializable(): BaseErrorSchema
Helper method to get base serializable fields. Subclasses should use this to build their complete serializable object.
-
getContext(): Record<string, unknown>
Get the current context object.
-
getTraceId(): string | undefined
Get the trace ID for this error. Returns the trace ID captured at error creation time.
-
id: string
Unique identifier for this error instance
-
name: string
Error type name (used for discrimination)
-
toJSON(): string
Serializes error to JSON string.
-
toSerializable(): TData
Serializes error to a plain object. Subclasses must implement this to return their specific data type.
-
traceIdGetter: (() => string | undefined) | undefined
Optional callback to provide a trace ID from ambient context (e.g. OpenTelemetry).
-
withContext(context?: Record<string, unknown>): this
Add contextual information to this error. Useful for adding runtime context like request IDs, user IDs, etc.
-
withTraceId(traceId: string | undefined): this
Attach a trace ID if one was not captured when the error was created.
Error raised when client authentication was delegated to caller-owned routing.
& { operation?: string; context?: Record<string, unknown>; id?: string; }
Error for KV storage operations. Used when key-value store operations fail.
- name: "KVError"
- operation: string
-
toSerializable(): KVErrorData
Serializes error to a plain object.
& { operationId: string; state?: string; operation?: string; service?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a Trellis operation lifecycle mutation targets a terminal operation.
- name: "OperationAlreadyTerminalError"
- operation: string
- operationId: string
- service: string
- state: string
-
toSerializable(): OperationAlreadyTerminalErrorData
Serializes error to a plain object.
- input(input: TInput): TDesc["transfer"] extends undefined ? OperationInputBuilder<TDesc, TProgress, TOutput> : TransferCapableOperationInputBuilder<TDesc, TProgress, TOutput>
- resume(ref: OperationRefData): OperationRef<TDesc, TProgress, TOutput>
-
start(): AsyncResult<input: TInput,callbacks?: OperationObserverCallbacks<TProgress, TOutput>>OperationRef<TDesc, TProgress, TOutput>,OperationControlError | UnexpectedError
& { operationId: string; expectedService: string; expectedOperation: string; actualService?: string; actualOperation?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a Trellis operation id belongs to a different service or operation.
& { operationId: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a requested Trellis operation id cannot be found.
- name: "OperationNotFoundError"
- operationId: string
-
toSerializable(): OperationNotFoundErrorData
Serializes error to a plain object.
& { error: TransportableTrellisErrorData; context?: Record<string, unknown>; id?: string; }
Error for wrapping errors received from remote Trellis services. This is the only error type with parseJSON/parseObject methods for deserializing remote errors.
- name: "RemoteError"
-
parse(data: unknown): Result<>TransportableTrellisErrorData,ValidationError | UnexpectedError
Parses and validates a plain object as TrellisErrorData. Use this to deserialize errors received from remote services.
-
parseJSON
Alias for parse() - parses JSON string or object as TrellisErrorData.
- remoteError: TransportableTrellisErrorData
-
toSerializable(): RemoteErrorData
Serializes error to a plain object.
A synchronous Result class that represents either success (Ok) or failure (Err).
-
_unsafeValue(): ResultValue<T, E>
Internal method to get the raw value (for testing/debugging). Not recommended for general use - prefer take() instead.
-
all<T, E extends BaseError>(results: readonly Result<T, E>[]): Result<T[], E>
Combines multiple Results into a single Result containing an array.
-
andThen<U, F extends BaseError>(fn: (value: T) => Result<U, F>): Result<U, E | F>
Chains operations that return Results (also known as flatMap).
-
any<T, E extends BaseError>(results: readonly Result<T, E>[]): Result<T, E>
Returns the first Ok result from an array of Results.
-
context(): Result<T, E>message: string,extra?: Record<string, unknown>
Adds context to an Err result for early returns. Chainable with take() for adding context when propagating errors.
-
err<E extends BaseError, T = never>(error: E): Result<T, E>
Creates a failed Result containing an error.
-
error(): E
Gets the error from an Err Result.
-
inspect(fn: (value: T) => void): Result<T, E>
Performs a side effect on the Ok value without changing the Result.
-
inspectErr(fn: (error: E) => void): Result<T, E>
Performs a side effect on the Err value without changing the Result.
-
isErr<T, E extends BaseError>(result: Result<T, E>): result is Result<never, E>
Type guard to check if a value is an Err Result.
-
isOk<T, E extends BaseError>(result: Result<T, E>): result is Result<T, never>
Type guard to check if a value is an Ok Result.
-
map<U>(fn: (value: T) => U): Result<U, E>
Transforms the Ok value using a mapper function, leaving Err untouched.
-
mapErr<F extends BaseError>(fn: (error: E) => F): Result<T, F>
Transforms the Err value using a mapper function, leaving Ok untouched.
-
match<U>(pattern: { ok: (value: T) => U; err: (error: E) => U; }): U
Pattern matching for Results - handle both Ok and Err cases.
-
ok<T, E extends BaseError = never>(value: T): Result<T, E>
Creates a successful Result containing a value.
-
or<U>(other: Result<U, E>): Result<T | U, E>
Returns this result if Ok, otherwise returns the fallback result.
-
orElse<U, F extends BaseError>(fn: (error: E) => Result<U, F>): Result<T | U, F>
Returns this result if Ok, otherwise computes a fallback from the error.
-
orThrow(): T
Returns the Ok value or throws the Err error.
-
take(): [T] extends [never] ? Result<never, E> : T | Result<never, E>
Extracts the value from Ok or returns the Err for early returns.
-
try<T>(): Result<T, UnexpectedError>fn: () => T,context?: Record<string, unknown>
Wraps a function that might throw into a Result.
-
unwrapOr<U>(defaultValue: U): T | U
Returns the Ok value or a default value if Err.
-
unwrapOrElse<U>(fn: (error: E) => U): T | U
Returns the Ok value or computes a default from the error.
Framework-neutral Trellis connection lifecycle handle.
-
close(): Promise<void>
Closes the underlying transport and publishes a terminal closed status.
-
setStatus(status: TrellisConnectionStatus): void
Publishes a new status to all active listeners.
-
status(): TrellisConnectionStatus
Returns the latest observed connection status.
-
stopObserving(): void
Stops status observation without closing the underlying transport.
-
subscribe(listener: TrellisConnectionStatusListener): () => void
Subscribes to status changes and immediately delivers the current status.
Abstract base class for Trellis errors. Trellis errors automatically include traceId when initTelemetry() has been called and a span is active in the current context.
-
create<S extends TSchema>(): AsyncResult<TypedKVEntry<S>, ValidationError>schema: S,kv: KV,entry: KvEntry
- createdAt()
- delete(vcc?: boolean): AsyncResult<void, KVError>
- key()
-
merge(): AsyncResult<void, KVError | ValidationError>value: unknown,vcc?: boolean
-
put(): AsyncResult<void, KVError>value: unknown,vcc?: boolean
- revision()
- value(): StaticDecode<S>
-
watch(): Promise<() => void>callback: (event: WatchEvent<S>) => void,opts?: WatchOptions
Watch this KV entry for changes.
Represents an unexpected error. Use this for wrapping unknown errors or for truly unexpected conditions.
- name: "UnexpectedError"
-
toSerializable(): UnexpectedErrorData
Serializes error to a plain object.
& { errors: Iterable<ValidationErrorInput>; context?: Record<string, unknown>; id?: string; }
Error for data validation failures. Includes schema validation and missing required data.
- name: "ValidationError"
-
toSerializable(): ValidationErrorData
Serializes error to a plain object. Transforms internal errors array to issues array for serialization.
Builds a CursorPage from items and an optional next cursor.
Builds a PageResponse from a pre-sliced offset page.
Create a schema for a cursor page response with typed items.
Define a transportable Trellis error class from a payload-object schema.
Canonicalizes JSON and computes its SHA-256 base64url digest.
Validates and normalizes a cursor pagination query.
Validates and normalizes an offset pagination query.
Create a schema for a bounded page response with typed entries.
-
onTransfer(handler: NonNullable<>): TransferOperationBuilder<TDesc, TProgress, TOutput>OperationObserverCallbacks<TProgress, TOutput>["onTransfer"]
-
start(callbacks?: OperationObserverCallbacks<TProgress, TOutput>): AsyncResult<>StartedTransfer<TDesc, TProgress, TOutput>,OperationControlError | UnexpectedError | TransferError
- log: LoggerLike
-
name: string
Logical name for this client instance (used for logs and consumer names). Defaults to "client".
- noResponderRetry: NoResponderRetryOpts
- stream: string
- timeout: number
Public client-side surface returned by TrellisClient.connect.
- api: TA
- connection: TrellisConnection
- event: ActiveEventFacade<TA>
- feed: ActiveFeedFacade<TA>
- handle: { readonly rpc: ActiveRpcHandleFacade<TA, TRequests>; }
- name: string
- operation: ActiveOperationFacade<TA>
-
prepare<E extends EventsOf<TA>>(): Result<event: E,data: EventPayloadOf<TA, E>>PreparedTrellisEvent<EventPayloadOf<TA, E>>,ValidationError | UnexpectedError
-
publish<E extends EventsOf<TA>>(): AsyncResult<void, ValidationError | UnexpectedError>event: E,data: EventPayloadOf<TA, E>
- publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
-
request<M extends RequestMethodOf<TRequests>>(): AsyncResult<RequestOutputOf<TRequests, M>, BaseError>method: M,input: RequestInputOf<TRequests, M>,opts?: RequestOpts
- rpc: ActiveRpcFacade<TA>
- state: StateFacade<TState>
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
- CONTRACT_MODULE_METADATA: ContractModule<TContractId, TApi, ApiShape, ApiShape>
- contract: TContractId
- events: { publish?: UseEventsPublish<TSpec>; subscribe?: UseEventsSubscribe<TSpec>; }
- feeds: { subscribe?: UseFeedsSubscribe<TSpec>; }
- operations: { call?: UseOperationsCall<TSpec>; }
- rpc: { call?: UseRpcCall<TSpec>; }
Cursor pagination response with typed items.
Cursor pagination response metadata.
Cursor pagination query.
Options for normalizing a cursor pagination query.
-
defaultLimit: number
Limit used when the query does not specify one. Defaults to
100. -
maxLimit: number
Maximum accepted limit. Defaults to
500.
| undefined
| undefined
| undefined
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: TErrors
- eventConsumers: ContractSourceEventConsumers
- events: TEvents
- exports: ContractSourceExports<SchemaNameOf<TSchemas>>
-
feeds: Readonly<>Record<>string,ContractSourceFeed<SchemaNameOf<TSchemas>, CapabilityRef<TCapabilities>>
- id: string
- jobs: ContractSourceJobs<SchemaNameOf<TSchemas>>
- kind: ContractKind
- operations: TOperations
- resources: ContractSourceResources<SchemaNameOf<TSchemas>>
- rpc: TRpc
- schemas: TSchemas
- state: ContractSourceState<SchemaNameOf<TSchemas>>
- uses: TUses
Context provided to event listener callbacks.
-
group: string
Durable event consumer group, when delivered through a group.
-
id: string
Stable event id from the Trellis event header.
-
mode: "durable" | "ephemeral"
Runtime listener mode that delivered the event.
-
sequence: number
JetStream sequence number, when available.
-
subject: string
NATS subject that delivered the event.
-
time: Date
Event creation time from the Trellis event header.
- durableName: string
-
group: string
Contract event consumer group to use for durable service listeners when an event is declared in more than one group.
- mode: "durable" | "ephemeral"
- replay: "all" | "new"
- signal: AbortSignal
- event: ActiveEventPublishFacade<TA>
- feed: ActiveFeedFacade<TA>
- operation: ActiveOperationFacade<TA>
-
prepare(): Result<PreparedTrellisEvent, ValidationError | UnexpectedError>event: string,data: Record<string, unknown>
-
publish(): AsyncResult<void, ValidationError | UnexpectedError>event: string,data: Record<string, unknown>
- publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
-
request<M extends RequestMethodOf<TRequests>>(): AsyncResult<RequestOutputOf<TRequests, M>, BaseError>method: M,input: RequestInputOf<TRequests, M>,opts?: RequestOpts
- rpc: ActiveRpcFacade<TA>
-
stopEventListeners(): void
Stops durable event listener loops owned by this handler runtime.
| StateMigrationRequiredEntry<MapStateEntry<unknown>>
-
delete(): AsyncResult<{ deleted: boolean; }, BaseError>key: string,opts?: StateDeleteOptions
-
get(key: string): AsyncResult<>StateGetResult<{ kind: "map"; value: TValue; }>,BaseError
-
list(opts?: StateListOptions): AsyncResult<>{ entries: Array<>; count: number; offset: number; limit: number; nextOffset?: number; },MapStateEntry<TValue>
| StateMigrationRequiredEntry<MapStateEntry<unknown>>BaseError - prefix(path: string): MapStateStoreClient<TValue>
-
put(): AsyncResult<key: string,value: TValue,opts?: StatePutOptions>StatePutResult<{ kind: "map"; value: TValue; }>,BaseError
A type that accepts either a Result or AsyncResult with the same T and E types.
Cursor query after defaults and validation have been applied.
Errors returned when an operation control request fails before producing a snapshot or ack.
| OperationAlreadyTerminalError
| OperationMismatchError
Errors returned when an operation control request violates lifecycle state.
- onAccepted: (event: AcceptedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onCancelled: (event: CancelledOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onCompleted: (event: CompletedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onEvent: (event: OperationEvent<TProgress, TOutput>) => void | Promise<void>
- onFailed: (event: FailedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onProgress: (event: ProgressOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onStarted: (event: StartedOperationEvent<TProgress, TOutput>) => void | Promise<void>
- onTransfer: (event: TransferOperationEvent<TProgress, TOutput>) => void | Promise<void>
-
cancel(): AsyncResult<>OperationSnapshot<TProgress, TOutput>,OperationControlError | UnexpectedError
-
get(): AsyncResult<>OperationSnapshot<TProgress, TOutput>,OperationControlError | UnexpectedError
- id: string
- operation: string
- service: string
-
signal(): AsyncResult<signal: string,input?: unknown>OperationSignalAck<TProgress, TOutput>,OperationControlError | UnexpectedError
-
wait(): AsyncResult<>TerminalOperation<TProgress, TOutput>,OperationControlError | UnexpectedError
-
watch(): AsyncResult<>AsyncIterable<OperationEvent<TProgress, TOutput>>,OperationControlError | UnexpectedError
- accept(args: { sessionKey: string; }): AsyncResult<AcceptedOperation<TProgress, TOutput>, UnexpectedError>
-
control(operationId: string): AsyncResult<OperationRuntimeHandle<TProgress, TOutput>, BaseError>
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
- handle(handler: (context: OperationHandlerContext<TInput, TProgress, TOutput, TTransfer>) => unknown | Promise<unknown>): Promise<void>
- attach(job: { wait(): AsyncResult<unknown, BaseError>; }): AsyncResult<RuntimeOperationSnapshot, BaseError>
- cancel(): AsyncResult<RuntimeOperationSnapshot, BaseError>
- complete(value: TOutput): AsyncResult<RuntimeOperationSnapshot, BaseError>
- defer(): OperationDeferred
- fail(error: BaseError): AsyncResult<RuntimeOperationSnapshot, BaseError>
- id: string
- nextSignal(name?: string): AsyncResult<RuntimeOperationSignal, BaseError>
- progress(value: TProgress): AsyncResult<RuntimeOperationSnapshot, BaseError>
- signals(): AsyncIterable<RuntimeOperationSignal>
- started(): AsyncResult<RuntimeOperationSnapshot, BaseError>
Bounded pagination request.
Bounded pagination response with typed entries.
A fully encoded event whose subject, payload, and headers are stable.
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: Record<string, ContractErrorDecl>
- eventConsumers: ContractEventConsumers
- events: Record<string, ContractEvent>
- exports: ContractExports
- feeds: Record<string, ContractFeed>
- format: CONTRACT_FORMAT_V1
- id: string
- jobs: ContractJobs
- kind: ContractKind
- operations: Record<string, ContractOperation>
- resources: ContractResources
- rpc: Record<string, ContractRpcMethod>
- schemas: ContractSchemas
- state: ContractState
- uses: ContractUses
- events: { publish?: readonly StringKeyOf<TApi["events"]>[]; subscribe?: readonly StringKeyOf<TApi["events"]>[]; }
- feeds: { subscribe?: readonly StringKeyOf<NonNullable<TApi["feeds"]>>[]; }
- operations: { call?: readonly StringKeyOf<TApi["operations"]>[]; }
- rpc: { call?: readonly StringKeyOf<TApi["rpc"]>[]; }
Options for the watch() method.
-
includeDeletes: boolean
If true, include delete events in the watch stream. Defaults to false.
Schema for cursor pagination response metadata.
Schema for a cursor pagination query.
Schema for a bounded pagination request.
Verifies that event subject parameter pointers resolve to tokenable schemas.
Builds a CursorPage from items and an optional next cursor.
Builds a PageResponse from a pre-sliced offset page.
Return the global capability namespace for a contract id.
Create a schema for a cursor page response with typed items.
Define a transportable Trellis error class from a payload-object schema.
Compute the v1 contract digest from the normalized digest projection.
Canonicalizes JSON and computes its SHA-256 base64url digest.
Returns the first schema node reachable by following a payload JSON Pointer.
Return the globally qualified name for a contract-local capability.
Return the canonical manifest shape used by Trellis runtimes before validation, persistence, and digesting.
Validates and normalizes a cursor pagination query.
Validates and normalizes an offset pagination query.
Create a schema for a bounded page response with typed entries.
Parse untrusted contract JSON into the current Trellis v1 manifest shape.
Build the normalized runtime/interface projection used for contract identity.
Computes a synchronous SHA-256 digest encoded as base64url.
- CONTRACT_MODULE_METADATA: ContractModule<TContractId, TApi, ApiShape, ApiShape>
- contract: TContractId
- events: { publish?: UseEventsPublish<TSpec>; subscribe?: UseEventsSubscribe<TSpec>; }
- feeds: { subscribe?: UseFeedsSubscribe<TSpec>; }
- operations: { call?: UseOperationsCall<TSpec>; }
- rpc: { call?: UseRpcCall<TSpec>; }
- cancel: boolean
- capabilities: { call?: Capability[]; observe?: Capability[]; cancel?: Capability[]; control?: Capability[]; }
- docs: ContractDocs
- input: ContractSchemaRef
- output: ContractSchemaRef
- progress: ContractSchemaRef
- signals: Record<string, ContractOperationSignal>
- subject: string
- transfer: { direction: "send"; store: string; key: `/${string}`; contentType?: `/${string}`; metadata?: `/${string}`; expiresInMs?: number; maxBytes?: number; }
- version: `v${number}`
- ackWaitMs: number
- backoffMs: readonly number[]
- concurrency: number
- defaultDeadlineMs: number
- dlq: boolean
- docs: ContractDocs
- keyConcurrency: { key: readonly string[]; maxActive?: number; heartbeatIntervalMs?: number; heartbeatTtlMs?: number; stalePolicy?: "fail-stale" | "block"; }
- logs: boolean
- maxDeliver: number
- payload: ContractSchemaRef<TSchemaName>
- progress: boolean
- queue: { maxQueuedPerKey?: number; whenFull?: "reject" | "coalesce" | "replace-oldest"; }
- result: ContractSchemaRef<TSchemaName>
- cancel: boolean
- capabilities: { call?: readonly TCapability[]; observe?: readonly TCapability[]; cancel?: readonly TCapability[]; control?: readonly TCapability[]; }
- docs: ContractDocs
- input: ContractSchemaRef<TSchemaName>
- output: ContractSchemaRef<TSchemaName>
- progress: ContractSchemaRef<TSchemaName>
- signals: Record<string, ContractSourceOperationSignal<TSchemaName>>
- subject: string
- transfer: { direction: "send"; store: string; key: `/${string}`; contentType?: `/${string}`; metadata?: `/${string}`; expiresInMs?: number; maxBytes?: number; }
- version: `v${number}`
Cursor pagination response with typed items.
Cursor pagination response metadata.
Cursor pagination query.
Options for normalizing a cursor pagination query.
-
defaultLimit: number
Limit used when the query does not specify one. Defaults to
100. -
maxLimit: number
Maximum accepted limit. Defaults to
500.
| undefined
| undefined
| undefined
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: TErrors
- eventConsumers: ContractSourceEventConsumers
- events: TEvents
- exports: ContractSourceExports<SchemaNameOf<TSchemas>>
-
feeds: Readonly<>Record<>string,ContractSourceFeed<SchemaNameOf<TSchemas>, CapabilityRef<TCapabilities>>
- id: string
- jobs: ContractSourceJobs<SchemaNameOf<TSchemas>>
- kind: ContractKind
- operations: TOperations
- resources: ContractSourceResources<SchemaNameOf<TSchemas>>
- rpc: TRpc
- schemas: TSchemas
- state: ContractSourceState<SchemaNameOf<TSchemas>>
- uses: TUses
- events: Simplify<TUsedApi["events"] & TOwnedApi["events"]>
- feeds: Simplify<TUsedApi["feeds"] & TOwnedApi["feeds"]>
- operations: Simplify<TUsedApi["operations"] & TOwnedApi["operations"]>
- rpc: Simplify<TUsedApi["rpc"] & TOwnedApi["rpc"]>
- subjects: Simplify<TUsedApi["subjects"] & TOwnedApi["subjects"]>
Cursor query after defaults and validation have been applied.
Bounded pagination request.
Bounded pagination response with typed entries.
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: Record<string, ContractSourceErrorDecl>
- eventConsumers: ContractSourceEventConsumers
- events: Record<string, ContractSourceEvent>
- exports: ContractSourceExports
- feeds: Record<string, ContractSourceFeed>
- id: string
- jobs: ContractSourceJobs
- kind: ContractKind
- operations: Record<string, ContractSourceOperation>
- resources: ContractSourceResources
- rpc: Record<string, ContractSourceRpcMethod>
- schemas: ContractSourceSchemas
- state: ContractSourceState
- uses: ContractSourceUses
- capabilities: ContractCapabilities
- description: string
- displayName: string
- docs: ContractDocs
- errors: Record<string, ContractErrorDecl>
- eventConsumers: ContractEventConsumers
- events: Record<string, ContractEvent>
- exports: ContractExports
- feeds: Record<string, ContractFeed>
- format: CONTRACT_FORMAT_V1
- id: string
- jobs: ContractJobs
- kind: ContractKind
- operations: Record<string, ContractOperation>
- resources: ContractResources
- rpc: Record<string, ContractRpcMethod>
- schemas: ContractSchemas
- state: ContractState
- uses: ContractUses
- events: { publish?: readonly StringKeyOf<TApi["events"]>[]; subscribe?: readonly StringKeyOf<TApi["events"]>[]; }
- feeds: { subscribe?: readonly StringKeyOf<NonNullable<TApi["feeds"]>>[]; }
- operations: { call?: readonly StringKeyOf<TApi["operations"]>[]; }
- rpc: { call?: readonly StringKeyOf<TApi["rpc"]>[]; }
Schema for cursor pagination response metadata.
Schema for a cursor pagination query.
Schema for a bounded pagination request.
- api: TApi
- connection: TrellisConnection
- event: DeviceRuntime<TApi, TState>["event"]
- health: ServiceHealth
- name: string
- operation: DeviceRuntime<TApi, TState>["operation"]
- publish: DeviceRuntime<TApi, TState>["publish"]
- request: DeviceRuntime<TApi, TState>["request"]
- state: DeviceRuntime<TApi, TState>["state"]
- stream: string
- timeout: number
- transfer: { (grant: SendTransferGrant): SendTransferHandle; (grant: ReceiveTransferGrant): ReceiveTransferHandle; }
Reports Deno device activation status and hides local activation persistence details.
& { stateDir?: string; statePath?: string; }
Options for the Deno-only device activation status helper.
Activation status for a device that is already ready to connect.
Activation status for a device that still needs activation.
| TrellisDeviceNotReadyStatus
| TrellisDeviceActivationRequiredStatus
Caller-facing activation status union for Deno device runtimes.
Activation status for a device that cannot proceed yet.
-
add(): () => voidname: string,check: ServiceHealthCheckFn
- checks(): Promise<HealthCheckResult[]>
- contractDigest: string
- contractId: string
- heartbeat(): Promise<HealthHeartbeat>
- instanceId: string
- kind: HealthHeartbeat["service"]["kind"]
- publishIntervalMs: number
- response(): Promise<HealthResponse>
- serviceName: string
- setInfo(info: ServiceHealthInfo | ServiceHealthInfoFn): void
- startedAt: string
Runs all health checks and returns an aggregated health response.
Runs a single health check and returns the result.
A health check function that returns a Result indicating health status.
Result of a single health check.
-
error: string
Error message if the check failed with an error
-
info: Record<string, JsonValue>
Optional structured metadata for the check
-
latencyMs: number
Time in milliseconds the check took to execute
-
name: string
Name of the health check
-
status: "ok" | "failed"
Status of the check: "ok" if passed, "failed" if not
-
summary: string
Optional short human-readable summary
- checks: HealthCheckResult[]
- service: { name: string; kind: "service" | "device"; instanceId: string; contractId: string; contractDigest: string; startedAt: string; publishIntervalMs: number; runtime: "deno" | "node" | "rust" | "unknown"; runtimeVersion?: string; version?: string; info?: Record<string, JsonValue>; }
- status: HealthResponse["status"]
- summary: string
Aggregated health response for a service.
-
checks: HealthCheckResult[]
Individual health check results
-
service: string
Name of the service
-
status: "healthy" | "unhealthy" | "degraded"
Overall status: "healthy" if all pass, "unhealthy" if all fail, "degraded" if mixed
-
timestamp: string
ISO timestamp of when the health check was performed
Legacy service host entry point.
In-memory inbox repository intended for duplicate-suppression tests.
In-memory outbox repository intended for tests and local process adapters.
-
claimDue(): Promise<OutboxMessage[]>limit: number,now: Date
- enqueue(event: PreparedTrellisEvent): Promise<OutboxMessage>
-
markDispatched(): Promise<void>id: string,now: Date
-
markFailed(): Promise<void>id: string,failure: { error: string; nextAttemptAt: Date; now: Date; }
- snapshot(): readonly OutboxMessage[]
Durable NATS KV inbox repository for event-id duplicate suppression.
Durable NATS KV outbox repository for services without SQL state.
Coalesces outbox wakeups and drains due messages through dispatchOutbox.
-
notify(): void
Signals that outbox work may be available and schedules a drain soon.
-
stop(): void
Cancels pending wakeups and prevents future dispatch work.
-
add(): () => voidname: string,check: ServiceHealthCheckFn
- checks(): Promise<HealthCheckResult[]>
- contractDigest: string
- contractId: string
- heartbeat(): Promise<HealthHeartbeat>
- instanceId: string
- kind: HealthHeartbeat["service"]["kind"]
- publishIntervalMs: number
- response(): Promise<HealthResponse>
- serviceName: string
- setInfo(info: ServiceHealthInfo | ServiceHealthInfoFn): void
- startedAt: string
SQL-backed inbox repository over a caller-owned executor.
SQL-backed outbox repository over a caller-owned executor.
- binding: ResourceBindingStore
- open(): AsyncResult<TypedStore, StoreError>
-
waitFor(): AsyncResult<TypedStoreEntry, StoreError>key: string,options?: StoreWaitOptions
Waits for a staged object to appear in the bound store and returns its entry.
- auth: SessionAuth
-
completeOperation(): AsyncResult<unknown, BaseError>operationId: string,output: unknown
Completes an operation from Trellis-owned control-plane code that resolves an operation from a separate RPC handler.
-
connect<>(args: TrellisServiceConnectArgs<TContract>): AsyncResult<TContract extends ServiceContract<>TrellisAPI,TrellisAPI | undefined,ContractJobsMetadata,ContractKvMetadata>TrellisService<>,ContractOwnedApi<TContract>,ContractTrellisApi<TContract>,ContractJobsOf<TContract>,ContractKvOf<TContract>TransportError | UnexpectedError
-
connection: TrellisConnection
Framework-neutral lifecycle handle for the service runtime connection.
-
createTransfer(args: { direction: "receive"; store: string; key: string; sessionKey: string; expiresInMs?: number; }): AsyncResult<ReceiveTransferGrant, TransferError>
Creates a short-lived receive transfer grant for a caller session.
-
event: ActiveEventFacade<TTrellisApi>
Event lifecycle surface for service startup listeners and publishers.
- handle: TypedServiceHandleFacade<TOwnedApi, TTrellisApi, TKv, TJobs>
- health: ServiceHealth
- jobs: JobsFacadeOf<TJobs, TTrellisApi, TKv>
- kv: ServiceKvFacade<TKv>
- name: string
-
publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
Publishes a prepared event through the service runtime connection.
- stop(): Promise<void>
- store: Record<string, StoreHandle>
- wait(): Promise<void>
-
with<TDeps>(deps: TDeps): BoundTrellisService<TOwnedApi, TTrellisApi, TJobs, TKv, TDeps>
Returns a service wrapper that injects application dependencies into service-owned handler argument objects as
args.deps.
Creates an EventContext from a JetStream message.
Returns Postgres DDL for Trellis outbox and inbox tables.
Returns SQLite DDL for Trellis outbox and inbox tables.
Creates SQL outbox/inbox repositories plus DDL for caller-owned migrations.
Dispatches due outbox messages through a Trellis runtime publisher.
Type guard to check if a subscription is a GroupedSubscription.
Rehydrates a persisted outbox row into a prepared event.
Runs all health checks and returns an aggregated health response.
Runs a single health check and returns the result.
Context provided to event handlers with message metadata and acknowledgment controls.
-
ack: () => void
Acknowledge successful processing of the message
-
id: string
Unique identifier for this event
-
nak: (delay?: number) => void
Negative acknowledge - request redelivery, optionally after a delay in milliseconds
-
seq: number
JetStream sequence number for this message
-
term: () => void
Terminate processing - indicate the message should not be redelivered
-
time: Date
Timestamp when the event was created
Handler function for processing events.
& WithDeps<TDeps>
Typed feed handler function for an extracted Trellis service handler.
A subscription that handles multiple events as a group with shared ordering semantics.
-
group: OrderingGroup<TA>
The ordering group configuration
-
handlers: Partial<Record<Events<TA>, EventHandler<TA, Events<TA>>>>
Partial map of event types to their handlers
A health check function that returns a Result indicating health status.
Typed health check function for an extracted bound service health handler.
Result of a single health check.
-
error: string
Error message if the check failed with an error
-
info: Record<string, JsonValue>
Optional structured metadata for the check
-
latencyMs: number
Time in milliseconds the check took to execute
-
name: string
Name of the health check
-
status: "ok" | "failed"
Status of the check: "ok" if passed, "failed" if not
-
summary: string
Optional short human-readable summary
- checks: HealthCheckResult[]
- service: { name: string; kind: "service" | "device"; instanceId: string; contractId: string; contractDigest: string; startedAt: string; publishIntervalMs: number; runtime: "deno" | "node" | "rust" | "unknown"; runtimeVersion?: string; version?: string; info?: Record<string, JsonValue>; }
- status: HealthResponse["status"]
- summary: string
| undefined
| Promise<ServiceHealthInfo | undefined>
Typed health info function for an extracted bound service health handler.
Aggregated health response for a service.
-
checks: HealthCheckResult[]
Individual health check results
-
service: string
Name of the service
-
status: "healthy" | "unhealthy" | "degraded"
Overall status: "healthy" if all pass, "unhealthy" if all fail, "degraded" if mixed
-
timestamp: string
ISO timestamp of when the health check was performed
& WithDeps<TDeps>
Arguments passed to a typed Trellis service job handler.
Typed job handler function for an extracted Trellis service job handler.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (args: { job: PublicActiveJob<TPayload, TResult>; client: Trellis<TTrellisApi, TKv, TJobs>; }) => Promise<Result<TResult, BaseError>>): void
- submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Result returned by a typed Trellis service job handler.
Union type representing either a grouped or single subscription.
Options for subscribing to multiple events.
-
defaultMode: "strict" | "independent"
Default processing mode when not specified in a subscription
& { client: Trellis<
& WithDeps<TDeps>
Typed operation handler function for an extracted Trellis service handler.
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
-
accept(args: { sessionKey: string; }): AsyncResult<>AcceptedOperation<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>UnexpectedError
-
control(operationId: string): AsyncResult<>OperationRuntimeHandle<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>BaseError
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
-
handle(handler: (args: OperationHandlerContext<) => unknown | Promise<unknown>): Promise<void>>InferSchemaType<TOwnedApi["operations"][O]["input"]>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>,OperationTransferContextOf<TOwnedApi, O>
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
Defines a group of events that should be processed together with ordering guarantees.
-
events: Array<Events<TA>>
List of event types that belong to this group
-
mode: "strict" | "independent"
Processing mode: "strict" maintains order, "independent" allows parallel processing
-
name: string
Unique name for this ordering group
Options for OutboxDispatcher.
-
debounceMs: number
Delay used to debounce
notify()calls before starting a drain. -
idleRetryMs: number
Optional low-frequency wakeup for missed signals or process restarts.
-
limit: number
Maximum number of messages claimed by each
dispatchOutboxbatch. -
onError: (error: unknown) => void
Receives repository or publish errors raised by background dispatch.
-
retryDelayMs: number
Delay before failed messages become eligible; values below 1ms become 1ms.
& WithDeps<TDeps>
Typed event listener function for an extracted Trellis service listener.
A subscription for a single event type.
-
event: E
The event type to subscribe to
-
handler: EventHandler<TA, E>
Handler function for processing events of this type
-
opts: SubscribeOpts
Optional subscription configuration
Options for subscribing to events.
- consumerName: string
-
filter: Record<string, string>
Filter events by template variables (e.g., { origin: "github", id: "user-123" })
-
startSeq: number
Start consuming from a specific sequence number
-
startTime: Date
Start consuming from a specific time
- contract: ServiceContract<TOwnedApi, TTrellisApi>
- name: string
- server: TrellisServiceServerOpts
- sessionKeySeed: string
-
telemetry: TrellisServiceConnectTelemetryOpts
Controls automatic telemetry initialization for this service connection. Enabled by default; pass
falseor{ enabled: false }to disable it. - trellisUrl: string
Controls automatic telemetry initialization for TrellisService.connect().
Internal Trellis control-plane host surface.
- api: TA
- auth: TrellisAuth
-
connection: TrellisConnection
Framework-neutral lifecycle handle for this Trellis runtime connection.
- contractDigest: string
- contractId: string
- event: ActiveEventFacade<TA>
- feed: ActiveFeedFacade<TA>
-
feedHandle<F extends FeedsOf<TA>>(feed: F): FeedInputBuilder<FeedInputOf<TA, F>, FeedEventOf<TA, F>>
& FeedRegistration<FeedInputOf<TA, F>, FeedEventOf<TA, F>> - handle: { readonly rpc: ActiveRpcHandleFacade<TA, TRequests>; }
- js: JetStreamClient
-
listenEvent<E extends EventsOf<TA>>(): AsyncResult<void, ValidationError | UnexpectedError>event: E,subjectData: Record<string, unknown>,fn: EventCallback<EventOf<TA, E>>,opts?: EventOpts
- loadOperationRecord(operationId: string): Promise<DurableOperationRecord | null>
-
mount(): Promise<void>method: string,fn: (args: { input: unknown; context: RpcHandlerContext; client: HandlerTrellis<TA, TRequests>; }) => MaybePromise<Result<unknown, BaseError>>
- name: string
- nats: NatsConnection
- operation: ActiveOperationFacade<TA>
- operationHandle<O extends OperationsOf<TA>>(operation: O): OperationSurface<TA, TMode, O>
- operationStoreHandle(): Promise<TypedKV<DurableOperationRecordSchema>>
-
prepare(): Result<PreparedTrellisEvent, ValidationError | UnexpectedError>event: string,data: Record<string, unknown>
Builds a stable event subject, encoded payload, and publish headers.
-
publish(): AsyncResult<void, ValidationError | UnexpectedError>event: string,data: Record<string, unknown>
-
publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
Publishes a previously prepared event without regenerating its id, time, subject, payload, or headers.
-
request<M extends RequestMethodOf<TRequests>>(): AsyncResult<RequestOutputOf<TRequests, M>, BaseError>method: M,input: RequestInputOf<TRequests, M>,opts?: RequestOpts
Makes an authenticated request to a Trellis RPC method.
-
requestAuthValidate(input: AuthRequestsValidateInput): AsyncResult<>AuthRequestsValidateResponse,AuthError
| RemoteError
| TransportError
| ValidationError
| UnexpectedError -
respondWithError(): voidmsg: Msg,error: Error | BaseError
- rpc: ActiveRpcFacade<TA>
- saveOperationRecord(runtime: RuntimeOperationRecord): Promise<void>
- state: StateFacade<TState>
-
stopEventListeners(): void
Stops durable event listener loops without closing the underlying transport.
- stream: string
-
template(): Result<string, ValidationError>subject: string,data: unknown,allowWildcards?: boolean
- timeout: number
-
transfer(grant: SendTransferGrant): SendTransferHandle
Creates a helper for a short-lived Trellis transfer grant.
- wait(): AsyncResult<void, BaseError>
-
create(): AsyncResult<void, KVError>key: string,value: unknown
- delete(key: string): AsyncResult<void, KVError>
-
fromParts<S extends TSchema>(): TypedKV<S>schema: S,kv: KV
- get(key: string): AsyncResult<TypedKVEntry<S>, KVError | ValidationError>
- keys(filter?: string | string[]): AsyncResult<AsyncIterable<string>, KVError>
-
open<S extends TSchema>(): AsyncResult<TypedKV<S>, KVError>nats: NatsConnection,name: string,schema: S,options: { history?: number; ttl?: number; bindOnly?: boolean; maxValueBytes?: number; replicas?: number; }
-
put(): AsyncResult<void, KVError>key: string,value: unknown
- serialize(value: unknown): string
- status(): AsyncResult<{ values: number; }, KVError>
Parses unknown JSON-compatible data with an arbitrary Trellis schema.
Legacy Node service host entry point.
- auth: SessionAuth
-
completeOperation(): AsyncResult<unknown, BaseError>operationId: string,output: unknown
Completes an operation from Trellis-owned control-plane code that resolves an operation from a separate RPC handler.
-
connect<>(args: TrellisServiceConnectArgs<TContract>): AsyncResult<TContract extends ServiceContract<>TrellisAPI,TrellisAPI | undefined,ContractJobsMetadata,ContractKvMetadata>TrellisService<>,ContractOwnedApi<TContract>,ContractTrellisApi<TContract>,ContractJobsOf<TContract>,ContractKvOf<TContract>TransportError | UnexpectedError
-
connection: TrellisConnection
Framework-neutral lifecycle handle for the service runtime connection.
-
createTransfer(args: { direction: "receive"; store: string; key: string; sessionKey: string; expiresInMs?: number; }): AsyncResult<ReceiveTransferGrant, TransferError>
Creates a short-lived receive transfer grant for a caller session.
-
event: ActiveEventFacade<TTrellisApi>
Event lifecycle surface for service startup listeners and publishers.
- handle: TypedServiceHandleFacade<TOwnedApi, TTrellisApi, TKv, TJobs>
- health: ServiceHealth
- jobs: JobsFacadeOf<TJobs, TTrellisApi, TKv>
- kv: ServiceKvFacade<TKv>
- name: string
-
publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
Publishes a prepared event through the service runtime connection.
- stop(): Promise<void>
- store: Record<string, StoreHandle>
- wait(): Promise<void>
-
with<TDeps>(deps: TDeps): BoundTrellisService<TOwnedApi, TTrellisApi, TJobs, TKv, TDeps>
Returns a service wrapper that injects application dependencies into service-owned handler argument objects as
args.deps.
& WithDeps<TDeps>
Typed feed handler function for an extracted Trellis service handler.
Typed health check function for an extracted bound service health handler.
| undefined
| Promise<ServiceHealthInfo | undefined>
Typed health info function for an extracted bound service health handler.
& WithDeps<TDeps>
Arguments passed to a typed Trellis service job handler.
Typed job handler function for an extracted Trellis service job handler.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (args: { job: PublicActiveJob<TPayload, TResult>; client: Trellis<TTrellisApi, TKv, TJobs>; }) => Promise<Result<TResult, BaseError>>): void
- submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Result returned by a typed Trellis service job handler.
& { client: Trellis<
& WithDeps<TDeps>
Typed operation handler function for an extracted Trellis service handler.
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
-
accept(args: { sessionKey: string; }): AsyncResult<>AcceptedOperation<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>UnexpectedError
-
control(operationId: string): AsyncResult<>OperationRuntimeHandle<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>BaseError
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
-
handle(handler: (args: OperationHandlerContext<) => unknown | Promise<unknown>): Promise<void>>InferSchemaType<TOwnedApi["operations"][O]["input"]>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>,OperationTransferContextOf<TOwnedApi, O>
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
& WithDeps<TDeps>
Typed event listener function for an extracted Trellis service listener.
- contract: ServiceContract<TOwnedApi, TTrellisApi>
- name: string
- server: TrellisServiceServerOpts
- sessionKeySeed: string
-
telemetry: TrellisServiceConnectTelemetryOpts
Controls automatic telemetry initialization for this service connection. Enabled by default; pass
falseor{ enabled: false }to disable it. - trellisUrl: string
Controls automatic telemetry initialization for TrellisService.connect().
- cancelled(): boolean
- context: Readonly<JobContext>
- heartbeat(): AsyncResult<void, BaseError>
- isRedelivery(): boolean
- log(entry: JobLogEntry): AsyncResult<void, BaseError>
- payload: TPayload
- progress(value: JobProgress): AsyncResult<void, BaseError>
- redeliveryCount(): number
- ref: JobRef<TPayload, TResult>
& { reason: JobNotEnqueuedReason; key: string; active: number; queued: number; limit: number; existingJobId?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error returned when keyed job admission does not create a new job.
- active: number
- existingJobId: string
- key: string
- limit: number
- name: "JobNotEnqueuedError"
- queued: number
- reason: JobNotEnqueuedReason
-
toSerializable(): JobNotEnqueuedErrorData
Serializes the admission error for transport or logging.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (job: ActiveJob<TPayload, TResult>) => Promise<Result<TResult, BaseError>>): void
-
submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Submits a job using queue policy outcomes for keyed queues. Unkeyed queues accept and return a new job reference.
- Auth.Connections.Closed: { event: AuthConnectionsClosedEvent; }
- Auth.Connections.Kicked: { event: AuthConnectionsKickedEvent; }
- Auth.Connections.Opened: { event: AuthConnectionsOpenedEvent; }
- Auth.DeviceUserAuthorities.Approved: { event: AuthDeviceUserAuthoritiesApprovedEvent; }
- Auth.DeviceUserAuthorities.Requested: { event: AuthDeviceUserAuthoritiesRequestedEvent; }
- Auth.DeviceUserAuthorities.Resolved: { event: AuthDeviceUserAuthoritiesResolvedEvent; }
- Auth.DeviceUserAuthorities.ReviewRequested: { event: AuthDeviceUserAuthoritiesReviewRequestedEvent; }
- Auth.Sessions.Revoked: { event: AuthSessionsRevokedEvent; }
- Auth.Capabilities.List: { input: AuthCapabilitiesListInput; output: AuthCapabilitiesListOutput; }
- Auth.CapabilityGroups.Delete: { input: AuthCapabilityGroupsDeleteInput; output: AuthCapabilityGroupsDeleteOutput; }
- Auth.CapabilityGroups.Get: { input: AuthCapabilityGroupsGetInput; output: AuthCapabilityGroupsGetOutput; }
- Auth.CapabilityGroups.List: { input: AuthCapabilityGroupsListInput; output: AuthCapabilityGroupsListOutput; }
- Auth.CapabilityGroups.Put: { input: AuthCapabilityGroupsPutInput; output: AuthCapabilityGroupsPutOutput; }
- Auth.CatalogIssues.Resolve: { input: AuthCatalogIssuesResolveInput; output: AuthCatalogIssuesResolveOutput; }
- Auth.Connections.Kick: { input: AuthConnectionsKickInput; output: AuthConnectionsKickOutput; }
- Auth.Connections.List: { input: AuthConnectionsListInput; output: AuthConnectionsListOutput; }
- Auth.DeploymentAuthority.AcceptMigration: { input: AuthDeploymentAuthorityAcceptMigrationInput; output: AuthDeploymentAuthorityAcceptMigrationOutput; }
- Auth.DeploymentAuthority.AcceptUpdate: { input: AuthDeploymentAuthorityAcceptUpdateInput; output: AuthDeploymentAuthorityAcceptUpdateOutput; }
- Auth.DeploymentAuthority.Get: { input: AuthDeploymentAuthorityGetInput; output: AuthDeploymentAuthorityGetOutput; }
- Auth.DeploymentAuthority.GrantOverrides.List: { input: AuthDeploymentAuthorityGrantOverridesListInput; output: AuthDeploymentAuthorityGrantOverridesListOutput; }
- Auth.DeploymentAuthority.GrantOverrides.Put: { input: AuthDeploymentAuthorityGrantOverridesPutInput; output: AuthDeploymentAuthorityGrantOverridesPutOutput; }
- Auth.DeploymentAuthority.GrantOverrides.Remove: { input: AuthDeploymentAuthorityGrantOverridesRemoveInput; output: AuthDeploymentAuthorityGrantOverridesRemoveOutput; }
- Auth.DeploymentAuthority.List: { input: AuthDeploymentAuthorityListInput; output: AuthDeploymentAuthorityListOutput; }
- Auth.DeploymentAuthority.Plan: { input: AuthDeploymentAuthorityPlanInput; output: AuthDeploymentAuthorityPlanOutput; }
- Auth.DeploymentAuthority.Plans.Get: { input: AuthDeploymentAuthorityPlansGetInput; output: AuthDeploymentAuthorityPlansGetOutput; }
- Auth.DeploymentAuthority.Plans.List: { input: AuthDeploymentAuthorityPlansListInput; output: AuthDeploymentAuthorityPlansListOutput; }
- Auth.DeploymentAuthority.Reconcile: { input: AuthDeploymentAuthorityReconcileInput; output: AuthDeploymentAuthorityReconcileOutput; }
- Auth.DeploymentAuthority.Reject: { input: AuthDeploymentAuthorityRejectInput; output: AuthDeploymentAuthorityRejectOutput; }
- Auth.Deployments.Create: { input: AuthDeploymentsCreateInput; output: AuthDeploymentsCreateOutput; }
- Auth.Deployments.Disable: { input: AuthDeploymentsDisableInput; output: AuthDeploymentsDisableOutput; }
- Auth.Deployments.Enable: { input: AuthDeploymentsEnableInput; output: AuthDeploymentsEnableOutput; }
- Auth.Deployments.List: { input: AuthDeploymentsListInput; output: AuthDeploymentsListOutput; }
- Auth.Deployments.Remove: { input: AuthDeploymentsRemoveInput; output: AuthDeploymentsRemoveOutput; }
- Auth.DeviceUserAuthorities.List: { input: AuthDeviceUserAuthoritiesListInput; output: AuthDeviceUserAuthoritiesListOutput; }
- Auth.DeviceUserAuthorities.Reviews.Decide: { input: AuthDeviceUserAuthoritiesReviewsDecideInput; output: AuthDeviceUserAuthoritiesReviewsDecideOutput; }
- Auth.DeviceUserAuthorities.Reviews.List: { input: AuthDeviceUserAuthoritiesReviewsListInput; output: AuthDeviceUserAuthoritiesReviewsListOutput; }
- Auth.DeviceUserAuthorities.Revoke: { input: AuthDeviceUserAuthoritiesRevokeInput; output: AuthDeviceUserAuthoritiesRevokeOutput; }
- Auth.Devices.ConnectInfo.Get: { input: AuthDevicesConnectInfoGetInput; output: AuthDevicesConnectInfoGetOutput; }
- Auth.Devices.Disable: { input: AuthDevicesDisableInput; output: AuthDevicesDisableOutput; }
- Auth.Devices.Enable: { input: AuthDevicesEnableInput; output: AuthDevicesEnableOutput; }
- Auth.Devices.List: { input: AuthDevicesListInput; output: AuthDevicesListOutput; }
- Auth.Devices.Provision: { input: AuthDevicesProvisionInput; output: AuthDevicesProvisionOutput; }
- Auth.Devices.Remove: { input: AuthDevicesRemoveInput; output: AuthDevicesRemoveOutput; }
- Auth.Health: { input: AuthHealthInput; output: AuthHealthOutput; }
- Auth.Identities.List: { input: AuthIdentitiesListInput; output: AuthIdentitiesListOutput; }
- Auth.IdentityGrants.List: { input: AuthIdentityGrantsListInput; output: AuthIdentityGrantsListOutput; }
- Auth.IdentityGrants.Revoke: { input: AuthIdentityGrantsRevokeInput; output: AuthIdentityGrantsRevokeOutput; }
- Auth.Portals.Get: { input: AuthPortalsGetInput; output: AuthPortalsGetOutput; }
- Auth.Portals.List: { input: AuthPortalsListInput; output: AuthPortalsListOutput; }
- Auth.Portals.LoginSettings.Get: { input: AuthPortalsLoginSettingsGetInput; output: AuthPortalsLoginSettingsGetOutput; }
- Auth.Portals.LoginSettings.Update: { input: AuthPortalsLoginSettingsUpdateInput; output: AuthPortalsLoginSettingsUpdateOutput; }
- Auth.Portals.Put: { input: AuthPortalsPutInput; output: AuthPortalsPutOutput; }
- Auth.Portals.Remove: { input: AuthPortalsRemoveInput; output: AuthPortalsRemoveOutput; }
- Auth.Portals.Routes.Put: { input: AuthPortalsRoutesPutInput; output: AuthPortalsRoutesPutOutput; }
- Auth.Portals.Routes.Remove: { input: AuthPortalsRoutesRemoveInput; output: AuthPortalsRoutesRemoveOutput; }
- Auth.Requests.Validate: { input: AuthRequestsValidateInput; output: AuthRequestsValidateOutput; }
- Auth.ServiceInstances.Disable: { input: AuthServiceInstancesDisableInput; output: AuthServiceInstancesDisableOutput; }
- Auth.ServiceInstances.Enable: { input: AuthServiceInstancesEnableInput; output: AuthServiceInstancesEnableOutput; }
- Auth.ServiceInstances.List: { input: AuthServiceInstancesListInput; output: AuthServiceInstancesListOutput; }
- Auth.ServiceInstances.Provision: { input: AuthServiceInstancesProvisionInput; output: AuthServiceInstancesProvisionOutput; }
- Auth.ServiceInstances.Remove: { input: AuthServiceInstancesRemoveInput; output: AuthServiceInstancesRemoveOutput; }
- Auth.Sessions.List: { input: AuthSessionsListInput; output: AuthSessionsListOutput; }
- Auth.Sessions.Logout: { input: AuthSessionsLogoutInput; output: AuthSessionsLogoutOutput; }
- Auth.Sessions.Me: { input: AuthSessionsMeInput; output: AuthSessionsMeOutput; }
- Auth.Sessions.Revoke: { input: AuthSessionsRevokeInput; output: AuthSessionsRevokeOutput; }
- Auth.UserIdentities.List: { input: AuthUserIdentitiesListInput; output: AuthUserIdentitiesListOutput; }
- Auth.UserIdentities.Unlink: { input: AuthUserIdentitiesUnlinkInput; output: AuthUserIdentitiesUnlinkOutput; }
- Auth.Users.Create: { input: AuthUsersCreateInput; output: AuthUsersCreateOutput; }
- Auth.Users.Get: { input: AuthUsersGetInput; output: AuthUsersGetOutput; }
- Auth.Users.IdentityLink.Create: { input: AuthUsersIdentityLinkCreateInput; output: AuthUsersIdentityLinkCreateOutput; }
- Auth.Users.List: { input: AuthUsersListInput; output: AuthUsersListOutput; }
- Auth.Users.Password.Change: { input: AuthUsersPasswordChangeInput; output: AuthUsersPasswordChangeOutput; }
- Auth.Users.PasswordReset.Create: { input: AuthUsersPasswordResetCreateInput; output: AuthUsersPasswordResetCreateOutput; }
- Auth.Users.Update: { input: AuthUsersUpdateInput; output: AuthUsersUpdateOutput; }
- feed: { }
-
operation: { readonly auth: { deviceUserAuthoritiesResolve: ((handler: OperationHandler<; }; }>) => Promise<void>)Types.AuthDeviceUserAuthoritiesResolveInput,Types.AuthDeviceUserAuthoritiesResolveProgress,Types.AuthDeviceUserAuthoritiesResolveOutput,{ },TDeps
& { accept(args: { sessionKey: string; }): AsyncResult<>; control(operationId: string): AsyncResult<AcceptedOperation<>,Types.AuthDeviceUserAuthoritiesResolveProgress,Types.AuthDeviceUserAuthoritiesResolveOutputUnexpectedError>; }OperationRuntimeHandle<>,Types.AuthDeviceUserAuthoritiesResolveProgress,Types.AuthDeviceUserAuthoritiesResolveOutputBaseError -
rpc: { readonly auth: { capabilitiesList(handler: RpcHandler<>): Promise<void>; capabilityGroupsDelete(handler: RpcHandler<Types.AuthCapabilitiesListInput,Types.AuthCapabilitiesListOutput,TDeps>): Promise<void>; capabilityGroupsGet(handler: RpcHandler<Types.AuthCapabilityGroupsDeleteInput,Types.AuthCapabilityGroupsDeleteOutput,TDeps>): Promise<void>; capabilityGroupsList(handler: RpcHandler<Types.AuthCapabilityGroupsGetInput,Types.AuthCapabilityGroupsGetOutput,TDeps>): Promise<void>; capabilityGroupsPut(handler: RpcHandler<Types.AuthCapabilityGroupsListInput,Types.AuthCapabilityGroupsListOutput,TDeps>): Promise<void>; catalogIssuesResolve(handler: RpcHandler<Types.AuthCapabilityGroupsPutInput,Types.AuthCapabilityGroupsPutOutput,TDeps>): Promise<void>; connectionsKick(handler: RpcHandler<Types.AuthCatalogIssuesResolveInput,Types.AuthCatalogIssuesResolveOutput,TDeps>): Promise<void>; connectionsList(handler: RpcHandler<Types.AuthConnectionsKickInput,Types.AuthConnectionsKickOutput,TDeps>): Promise<void>; deploymentAuthorityAcceptMigration(handler: RpcHandler<Types.AuthConnectionsListInput,Types.AuthConnectionsListOutput,TDeps>): Promise<void>; deploymentAuthorityAcceptUpdate(handler: RpcHandler<Types.AuthDeploymentAuthorityAcceptMigrationInput,Types.AuthDeploymentAuthorityAcceptMigrationOutput,TDeps>): Promise<void>; deploymentAuthorityGet(handler: RpcHandler<Types.AuthDeploymentAuthorityAcceptUpdateInput,Types.AuthDeploymentAuthorityAcceptUpdateOutput,TDeps>): Promise<void>; deploymentAuthorityGrantOverridesList(handler: RpcHandler<Types.AuthDeploymentAuthorityGetInput,Types.AuthDeploymentAuthorityGetOutput,TDeps>): Promise<void>; deploymentAuthorityGrantOverridesPut(handler: RpcHandler<Types.AuthDeploymentAuthorityGrantOverridesListInput,Types.AuthDeploymentAuthorityGrantOverridesListOutput,TDeps>): Promise<void>; deploymentAuthorityGrantOverridesRemove(handler: RpcHandler<Types.AuthDeploymentAuthorityGrantOverridesPutInput,Types.AuthDeploymentAuthorityGrantOverridesPutOutput,TDeps>): Promise<void>; deploymentAuthorityList(handler: RpcHandler<Types.AuthDeploymentAuthorityGrantOverridesRemoveInput,Types.AuthDeploymentAuthorityGrantOverridesRemoveOutput,TDeps>): Promise<void>; deploymentAuthorityPlan(handler: RpcHandler<Types.AuthDeploymentAuthorityListInput,Types.AuthDeploymentAuthorityListOutput,TDeps>): Promise<void>; deploymentAuthorityPlansGet(handler: RpcHandler<Types.AuthDeploymentAuthorityPlanInput,Types.AuthDeploymentAuthorityPlanOutput,TDeps>): Promise<void>; deploymentAuthorityPlansList(handler: RpcHandler<Types.AuthDeploymentAuthorityPlansGetInput,Types.AuthDeploymentAuthorityPlansGetOutput,TDeps>): Promise<void>; deploymentAuthorityReconcile(handler: RpcHandler<Types.AuthDeploymentAuthorityPlansListInput,Types.AuthDeploymentAuthorityPlansListOutput,TDeps>): Promise<void>; deploymentAuthorityReject(handler: RpcHandler<Types.AuthDeploymentAuthorityReconcileInput,Types.AuthDeploymentAuthorityReconcileOutput,TDeps>): Promise<void>; deploymentsCreate(handler: RpcHandler<Types.AuthDeploymentAuthorityRejectInput,Types.AuthDeploymentAuthorityRejectOutput,TDeps>): Promise<void>; deploymentsDisable(handler: RpcHandler<Types.AuthDeploymentsCreateInput,Types.AuthDeploymentsCreateOutput,TDeps>): Promise<void>; deploymentsEnable(handler: RpcHandler<Types.AuthDeploymentsDisableInput,Types.AuthDeploymentsDisableOutput,TDeps>): Promise<void>; deploymentsList(handler: RpcHandler<Types.AuthDeploymentsEnableInput,Types.AuthDeploymentsEnableOutput,TDeps>): Promise<void>; deploymentsRemove(handler: RpcHandler<Types.AuthDeploymentsListInput,Types.AuthDeploymentsListOutput,TDeps>): Promise<void>; deviceUserAuthoritiesList(handler: RpcHandler<Types.AuthDeploymentsRemoveInput,Types.AuthDeploymentsRemoveOutput,TDeps>): Promise<void>; deviceUserAuthoritiesReviewsDecide(handler: RpcHandler<Types.AuthDeviceUserAuthoritiesListInput,Types.AuthDeviceUserAuthoritiesListOutput,TDeps>): Promise<void>; deviceUserAuthoritiesReviewsList(handler: RpcHandler<Types.AuthDeviceUserAuthoritiesReviewsDecideInput,Types.AuthDeviceUserAuthoritiesReviewsDecideOutput,TDeps>): Promise<void>; deviceUserAuthoritiesRevoke(handler: RpcHandler<Types.AuthDeviceUserAuthoritiesReviewsListInput,Types.AuthDeviceUserAuthoritiesReviewsListOutput,TDeps>): Promise<void>; devicesConnectInfoGet(handler: RpcHandler<Types.AuthDeviceUserAuthoritiesRevokeInput,Types.AuthDeviceUserAuthoritiesRevokeOutput,TDeps>): Promise<void>; devicesDisable(handler: RpcHandler<Types.AuthDevicesConnectInfoGetInput,Types.AuthDevicesConnectInfoGetOutput,TDeps>): Promise<void>; devicesEnable(handler: RpcHandler<Types.AuthDevicesDisableInput,Types.AuthDevicesDisableOutput,TDeps>): Promise<void>; devicesList(handler: RpcHandler<Types.AuthDevicesEnableInput,Types.AuthDevicesEnableOutput,TDeps>): Promise<void>; devicesProvision(handler: RpcHandler<Types.AuthDevicesListInput,Types.AuthDevicesListOutput,TDeps>): Promise<void>; devicesRemove(handler: RpcHandler<Types.AuthDevicesProvisionInput,Types.AuthDevicesProvisionOutput,TDeps>): Promise<void>; health(handler: RpcHandler<Types.AuthHealthInput, Types.AuthHealthOutput, TDeps>): Promise<void>; identitiesList(handler: RpcHandler<Types.AuthDevicesRemoveInput,Types.AuthDevicesRemoveOutput,TDeps>): Promise<void>; identityGrantsList(handler: RpcHandler<Types.AuthIdentitiesListInput,Types.AuthIdentitiesListOutput,TDeps>): Promise<void>; identityGrantsRevoke(handler: RpcHandler<Types.AuthIdentityGrantsListInput,Types.AuthIdentityGrantsListOutput,TDeps>): Promise<void>; portalsGet(handler: RpcHandler<Types.AuthIdentityGrantsRevokeInput,Types.AuthIdentityGrantsRevokeOutput,TDeps>): Promise<void>; portalsList(handler: RpcHandler<Types.AuthPortalsGetInput,Types.AuthPortalsGetOutput,TDeps>): Promise<void>; portalsLoginSettingsGet(handler: RpcHandler<Types.AuthPortalsListInput,Types.AuthPortalsListOutput,TDeps>): Promise<void>; portalsLoginSettingsUpdate(handler: RpcHandler<Types.AuthPortalsLoginSettingsGetInput,Types.AuthPortalsLoginSettingsGetOutput,TDeps>): Promise<void>; portalsPut(handler: RpcHandler<Types.AuthPortalsLoginSettingsUpdateInput,Types.AuthPortalsLoginSettingsUpdateOutput,TDeps>): Promise<void>; portalsRemove(handler: RpcHandler<Types.AuthPortalsPutInput,Types.AuthPortalsPutOutput,TDeps>): Promise<void>; portalsRoutesPut(handler: RpcHandler<Types.AuthPortalsRemoveInput,Types.AuthPortalsRemoveOutput,TDeps>): Promise<void>; portalsRoutesRemove(handler: RpcHandler<Types.AuthPortalsRoutesPutInput,Types.AuthPortalsRoutesPutOutput,TDeps>): Promise<void>; requestsValidate(handler: RpcHandler<Types.AuthPortalsRoutesRemoveInput,Types.AuthPortalsRoutesRemoveOutput,TDeps>): Promise<void>; serviceInstancesDisable(handler: RpcHandler<Types.AuthRequestsValidateInput,Types.AuthRequestsValidateOutput,TDeps>): Promise<void>; serviceInstancesEnable(handler: RpcHandler<Types.AuthServiceInstancesDisableInput,Types.AuthServiceInstancesDisableOutput,TDeps>): Promise<void>; serviceInstancesList(handler: RpcHandler<Types.AuthServiceInstancesEnableInput,Types.AuthServiceInstancesEnableOutput,TDeps>): Promise<void>; serviceInstancesProvision(handler: RpcHandler<Types.AuthServiceInstancesListInput,Types.AuthServiceInstancesListOutput,TDeps>): Promise<void>; serviceInstancesRemove(handler: RpcHandler<Types.AuthServiceInstancesProvisionInput,Types.AuthServiceInstancesProvisionOutput,TDeps>): Promise<void>; sessionsList(handler: RpcHandler<Types.AuthServiceInstancesRemoveInput,Types.AuthServiceInstancesRemoveOutput,TDeps>): Promise<void>; sessionsLogout(handler: RpcHandler<Types.AuthSessionsListInput,Types.AuthSessionsListOutput,TDeps>): Promise<void>; sessionsMe(handler: RpcHandler<Types.AuthSessionsLogoutInput,Types.AuthSessionsLogoutOutput,TDeps>): Promise<void>; sessionsRevoke(handler: RpcHandler<Types.AuthSessionsMeInput,Types.AuthSessionsMeOutput,TDeps>): Promise<void>; userIdentitiesList(handler: RpcHandler<Types.AuthSessionsRevokeInput,Types.AuthSessionsRevokeOutput,TDeps>): Promise<void>; userIdentitiesUnlink(handler: RpcHandler<Types.AuthUserIdentitiesListInput,Types.AuthUserIdentitiesListOutput,TDeps>): Promise<void>; usersCreate(handler: RpcHandler<Types.AuthUserIdentitiesUnlinkInput,Types.AuthUserIdentitiesUnlinkOutput,TDeps>): Promise<void>; usersGet(handler: RpcHandler<Types.AuthUsersGetInput, Types.AuthUsersGetOutput, TDeps>): Promise<void>; usersIdentityLinkCreate(handler: RpcHandler<Types.AuthUsersCreateInput,Types.AuthUsersCreateOutput,TDeps>): Promise<void>; usersList(handler: RpcHandler<Types.AuthUsersListInput, Types.AuthUsersListOutput, TDeps>): Promise<void>; usersPasswordChange(handler: RpcHandler<Types.AuthUsersIdentityLinkCreateInput,Types.AuthUsersIdentityLinkCreateOutput,TDeps>): Promise<void>; usersPasswordResetCreate(handler: RpcHandler<Types.AuthUsersPasswordChangeInput,Types.AuthUsersPasswordChangeOutput,TDeps>): Promise<void>; usersUpdate(handler: RpcHandler<Types.AuthUsersPasswordResetCreateInput,Types.AuthUsersPasswordResetCreateOutput,TDeps>): Promise<void>; }; }Types.AuthUsersUpdateInput,Types.AuthUsersUpdateOutput,TDeps
- api: Api
- connection: TrellisConnection
-
event: { readonly auth: { connectionsClosed: { publish(event: Types.AuthConnectionsClosedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthConnectionsClosedEvent): Result<>; listen(PreparedTrellisEvent<Types.AuthConnectionsClosedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; connectionsKicked: { publish(event: Types.AuthConnectionsKickedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthConnectionsKickedEvent): Result<handler: EventCallback<Types.AuthConnectionsClosedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthConnectionsKickedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; connectionsOpened: { publish(event: Types.AuthConnectionsOpenedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthConnectionsOpenedEvent): Result<handler: EventCallback<Types.AuthConnectionsKickedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthConnectionsOpenedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; deviceUserAuthoritiesApproved: { publish(event: Types.AuthDeviceUserAuthoritiesApprovedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthDeviceUserAuthoritiesApprovedEvent): Result<handler: EventCallback<Types.AuthConnectionsOpenedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthDeviceUserAuthoritiesApprovedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; deviceUserAuthoritiesRequested: { publish(event: Types.AuthDeviceUserAuthoritiesRequestedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthDeviceUserAuthoritiesRequestedEvent): Result<handler: EventCallback<Types.AuthDeviceUserAuthoritiesApprovedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthDeviceUserAuthoritiesRequestedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; deviceUserAuthoritiesResolved: { publish(event: Types.AuthDeviceUserAuthoritiesResolvedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthDeviceUserAuthoritiesResolvedEvent): Result<handler: EventCallback<Types.AuthDeviceUserAuthoritiesRequestedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthDeviceUserAuthoritiesResolvedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; deviceUserAuthoritiesReviewRequested: { publish(event: Types.AuthDeviceUserAuthoritiesReviewRequestedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthDeviceUserAuthoritiesReviewRequestedEvent): Result<handler: EventCallback<Types.AuthDeviceUserAuthoritiesResolvedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthDeviceUserAuthoritiesReviewRequestedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; sessionsRevoked: { publish(event: Types.AuthSessionsRevokedEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.AuthSessionsRevokedEvent): Result<handler: EventCallback<Types.AuthDeviceUserAuthoritiesReviewRequestedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts>; listen(PreparedTrellisEvent<Types.AuthSessionsRevokedEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; }; }handler: EventCallback<Types.AuthSessionsRevokedEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts
- feed: { }
- name: string
- operation: { readonly auth: { deviceUserAuthoritiesResolve: AuthDeviceUserAuthoritiesResolveOperation; }; }
-
rpc: { readonly auth: { capabilitiesList(): AsyncResult<Types.AuthCapabilitiesListOutput, BaseError>; capabilityGroupsDelete(input: Types.AuthCapabilitiesListInput,opts?: RequestOpts): AsyncResult<Types.AuthCapabilityGroupsDeleteOutput, BaseError>; capabilityGroupsGet(input: Types.AuthCapabilityGroupsDeleteInput,opts?: RequestOpts): AsyncResult<Types.AuthCapabilityGroupsGetOutput, BaseError>; capabilityGroupsList(input: Types.AuthCapabilityGroupsGetInput,opts?: RequestOpts): AsyncResult<Types.AuthCapabilityGroupsListOutput, BaseError>; capabilityGroupsPut(input: Types.AuthCapabilityGroupsListInput,opts?: RequestOpts): AsyncResult<Types.AuthCapabilityGroupsPutOutput, BaseError>; catalogIssuesResolve(input: Types.AuthCapabilityGroupsPutInput,opts?: RequestOpts): AsyncResult<Types.AuthCatalogIssuesResolveOutput, BaseError>; connectionsKick(input: Types.AuthCatalogIssuesResolveInput,opts?: RequestOpts): AsyncResult<Types.AuthConnectionsKickOutput, BaseError>; connectionsList(input: Types.AuthConnectionsKickInput,opts?: RequestOpts): AsyncResult<Types.AuthConnectionsListOutput, BaseError>; deploymentAuthorityAcceptMigration(input: Types.AuthConnectionsListInput,opts?: RequestOpts): AsyncResult<input: Types.AuthDeploymentAuthorityAcceptMigrationInput,opts?: RequestOpts>; deploymentAuthorityAcceptUpdate(Types.AuthDeploymentAuthorityAcceptMigrationOutput,BaseError): AsyncResult<Types.AuthDeploymentAuthorityAcceptUpdateOutput, BaseError>; deploymentAuthorityGet(input: Types.AuthDeploymentAuthorityAcceptUpdateInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentAuthorityGetOutput, BaseError>; deploymentAuthorityGrantOverridesList(input: Types.AuthDeploymentAuthorityGetInput,opts?: RequestOpts): AsyncResult<input: Types.AuthDeploymentAuthorityGrantOverridesListInput,opts?: RequestOpts>; deploymentAuthorityGrantOverridesPut(Types.AuthDeploymentAuthorityGrantOverridesListOutput,BaseError): AsyncResult<input: Types.AuthDeploymentAuthorityGrantOverridesPutInput,opts?: RequestOpts>; deploymentAuthorityGrantOverridesRemove(Types.AuthDeploymentAuthorityGrantOverridesPutOutput,BaseError): AsyncResult<input: Types.AuthDeploymentAuthorityGrantOverridesRemoveInput,opts?: RequestOpts>; deploymentAuthorityList(Types.AuthDeploymentAuthorityGrantOverridesRemoveOutput,BaseError): AsyncResult<Types.AuthDeploymentAuthorityListOutput, BaseError>; deploymentAuthorityPlan(input: Types.AuthDeploymentAuthorityListInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentAuthorityPlanOutput, BaseError>; deploymentAuthorityPlansGet(input: Types.AuthDeploymentAuthorityPlanInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentAuthorityPlansGetOutput, BaseError>; deploymentAuthorityPlansList(input: Types.AuthDeploymentAuthorityPlansGetInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentAuthorityPlansListOutput, BaseError>; deploymentAuthorityReconcile(input: Types.AuthDeploymentAuthorityPlansListInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentAuthorityReconcileOutput, BaseError>; deploymentAuthorityReject(input: Types.AuthDeploymentAuthorityReconcileInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentAuthorityRejectOutput, BaseError>; deploymentsCreate(input: Types.AuthDeploymentAuthorityRejectInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentsCreateOutput, BaseError>; deploymentsDisable(input: Types.AuthDeploymentsCreateInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentsDisableOutput, BaseError>; deploymentsEnable(input: Types.AuthDeploymentsDisableInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentsEnableOutput, BaseError>; deploymentsList(input: Types.AuthDeploymentsEnableInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentsListOutput, BaseError>; deploymentsRemove(input: Types.AuthDeploymentsListInput,opts?: RequestOpts): AsyncResult<Types.AuthDeploymentsRemoveOutput, BaseError>; deviceUserAuthoritiesList(input: Types.AuthDeploymentsRemoveInput,opts?: RequestOpts): AsyncResult<Types.AuthDeviceUserAuthoritiesListOutput, BaseError>; deviceUserAuthoritiesReviewsDecide(input: Types.AuthDeviceUserAuthoritiesListInput,opts?: RequestOpts): AsyncResult<input: Types.AuthDeviceUserAuthoritiesReviewsDecideInput,opts?: RequestOpts>; deviceUserAuthoritiesReviewsList(Types.AuthDeviceUserAuthoritiesReviewsDecideOutput,BaseError): AsyncResult<input: Types.AuthDeviceUserAuthoritiesReviewsListInput,opts?: RequestOpts>; deviceUserAuthoritiesRevoke(Types.AuthDeviceUserAuthoritiesReviewsListOutput,BaseError): AsyncResult<Types.AuthDeviceUserAuthoritiesRevokeOutput, BaseError>; devicesConnectInfoGet(input: Types.AuthDeviceUserAuthoritiesRevokeInput,opts?: RequestOpts): AsyncResult<Types.AuthDevicesConnectInfoGetOutput, BaseError>; devicesDisable(input: Types.AuthDevicesConnectInfoGetInput,opts?: RequestOpts): AsyncResult<Types.AuthDevicesDisableOutput, BaseError>; devicesEnable(input: Types.AuthDevicesDisableInput,opts?: RequestOpts): AsyncResult<Types.AuthDevicesEnableOutput, BaseError>; devicesList(input: Types.AuthDevicesEnableInput,opts?: RequestOpts): AsyncResult<Types.AuthDevicesListOutput, BaseError>; devicesProvision(input: Types.AuthDevicesListInput,opts?: RequestOpts): AsyncResult<Types.AuthDevicesProvisionOutput, BaseError>; devicesRemove(input: Types.AuthDevicesProvisionInput,opts?: RequestOpts): AsyncResult<Types.AuthDevicesRemoveOutput, BaseError>; health(input: Types.AuthDevicesRemoveInput,opts?: RequestOpts): AsyncResult<Types.AuthHealthOutput, BaseError>; identitiesList(input: Types.AuthHealthInput,opts?: RequestOpts): AsyncResult<Types.AuthIdentitiesListOutput, BaseError>; identityGrantsList(input: Types.AuthIdentitiesListInput,opts?: RequestOpts): AsyncResult<Types.AuthIdentityGrantsListOutput, BaseError>; identityGrantsRevoke(input: Types.AuthIdentityGrantsListInput,opts?: RequestOpts): AsyncResult<Types.AuthIdentityGrantsRevokeOutput, BaseError>; portalsGet(input: Types.AuthIdentityGrantsRevokeInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsGetOutput, BaseError>; portalsList(input: Types.AuthPortalsGetInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsListOutput, BaseError>; portalsLoginSettingsGet(input: Types.AuthPortalsListInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsLoginSettingsGetOutput, BaseError>; portalsLoginSettingsUpdate(input: Types.AuthPortalsLoginSettingsGetInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsLoginSettingsUpdateOutput, BaseError>; portalsPut(input: Types.AuthPortalsLoginSettingsUpdateInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsPutOutput, BaseError>; portalsRemove(input: Types.AuthPortalsPutInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsRemoveOutput, BaseError>; portalsRoutesPut(input: Types.AuthPortalsRemoveInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsRoutesPutOutput, BaseError>; portalsRoutesRemove(input: Types.AuthPortalsRoutesPutInput,opts?: RequestOpts): AsyncResult<Types.AuthPortalsRoutesRemoveOutput, BaseError>; requestsValidate(input: Types.AuthPortalsRoutesRemoveInput,opts?: RequestOpts): AsyncResult<Types.AuthRequestsValidateOutput, BaseError>; serviceInstancesDisable(input: Types.AuthRequestsValidateInput,opts?: RequestOpts): AsyncResult<Types.AuthServiceInstancesDisableOutput, BaseError>; serviceInstancesEnable(input: Types.AuthServiceInstancesDisableInput,opts?: RequestOpts): AsyncResult<Types.AuthServiceInstancesEnableOutput, BaseError>; serviceInstancesList(input: Types.AuthServiceInstancesEnableInput,opts?: RequestOpts): AsyncResult<Types.AuthServiceInstancesListOutput, BaseError>; serviceInstancesProvision(input: Types.AuthServiceInstancesListInput,opts?: RequestOpts): AsyncResult<Types.AuthServiceInstancesProvisionOutput, BaseError>; serviceInstancesRemove(input: Types.AuthServiceInstancesProvisionInput,opts?: RequestOpts): AsyncResult<Types.AuthServiceInstancesRemoveOutput, BaseError>; sessionsList(input: Types.AuthServiceInstancesRemoveInput,opts?: RequestOpts): AsyncResult<Types.AuthSessionsListOutput, BaseError>; sessionsLogout(input: Types.AuthSessionsListInput,opts?: RequestOpts): AsyncResult<Types.AuthSessionsLogoutOutput, BaseError>; sessionsMe(input: Types.AuthSessionsLogoutInput,opts?: RequestOpts): AsyncResult<Types.AuthSessionsMeOutput, BaseError>; sessionsRevoke(input: Types.AuthSessionsMeInput,opts?: RequestOpts): AsyncResult<Types.AuthSessionsRevokeOutput, BaseError>; userIdentitiesList(input: Types.AuthSessionsRevokeInput,opts?: RequestOpts): AsyncResult<Types.AuthUserIdentitiesListOutput, BaseError>; userIdentitiesUnlink(input: Types.AuthUserIdentitiesListInput,opts?: RequestOpts): AsyncResult<Types.AuthUserIdentitiesUnlinkOutput, BaseError>; usersCreate(input: Types.AuthUserIdentitiesUnlinkInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersCreateOutput, BaseError>; usersGet(input: Types.AuthUsersCreateInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersGetOutput, BaseError>; usersIdentityLinkCreate(input: Types.AuthUsersGetInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersIdentityLinkCreateOutput, BaseError>; usersList(input: Types.AuthUsersIdentityLinkCreateInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersListOutput, BaseError>; usersPasswordChange(input: Types.AuthUsersListInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersPasswordChangeOutput, BaseError>; usersPasswordResetCreate(input: Types.AuthUsersPasswordChangeInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersPasswordResetCreateOutput, BaseError>; usersUpdate(input: Types.AuthUsersPasswordResetCreateInput,opts?: RequestOpts): AsyncResult<Types.AuthUsersUpdateOutput, BaseError>; }; }input: Types.AuthUsersUpdateInput,opts?: RequestOpts
- state: TrellisAuthState
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
- count: number
-
entries: Array<>{ consequence?: string; contractDigest?: string; contractDisplayName?: string; contractId?: string; deploymentId?: string; description: string; direction?: "creates" | "given"; displayName: string; key: string; source: "contract" | "platform"; }
- limit: number
- nextOffset: number
- offset: number
| { clientId: number; connectedAt: string; contractDisplayName: string; contractId: string; key: string; participantKind: "agent"; principal: { identity: { identityId: string; provider: string; subject: string; }; name: string; type: "user"; userId: string; }; serverId: string; sessionKey: string; userNkey: string; }
| { clientId: number; connectedAt: string; contractDisplayName?: string; contractId: string; key: string; participantKind: "device"; principal: { deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; }; serverId: string; sessionKey: string; userNkey: string; }
| { clientId: number; connectedAt: string; key: string; participantKind: "service"; principal: { deploymentId: string; id: string; instanceId: string; name: string; type: "service"; }; serverId: string; sessionKey: string; userNkey: string; }
- count: number
-
entries: Array<>({ clientId: number; connectedAt: string; contractDisplayName: string; contractId: string; key: string; participantKind: "app"; principal: { identity: { identityId: string; provider: string; subject: string; }; name: string; type: "user"; userId: string; }; serverId: string; sessionKey: string; userNkey: string; })
| { clientId: number; connectedAt: string; contractDisplayName: string; contractId: string; key: string; participantKind: "agent"; principal: { identity: { identityId: string; provider: string; subject: string; }; name: string; type: "user"; userId: string; }; serverId: string; sessionKey: string; userNkey: string; }
| { clientId: number; connectedAt: string; contractDisplayName?: string; contractId: string; key: string; participantKind: "device"; principal: { deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; }; serverId: string; sessionKey: string; userNkey: string; }
| { clientId: number; connectedAt: string; key: string; participantKind: "service"; principal: { deploymentId: string; id: string; instanceId: string; name: string; type: "service"; }; serverId: string; sessionKey: string; userNkey: string; } - limit: number
- nextOffset: number
- offset: number
| { deploymentId: string; disabled: boolean; kind: "device"; reviewMode?: "none" | "required"; }
- count: number
-
entries: Array<>({ contractCompatibilityMode?: "strict" | "mutable-dev"; deploymentId: string; disabled: boolean; kind: "service"; namespaces: Array<string>; })
| { deploymentId: string; disabled: boolean; kind: "device"; reviewMode?: "none" | "required"; } - limit: number
- nextOffset: number
- offset: number
- connectInfo: { auth: { authority: "admin_reviewed" | "user_delegated"; iatSkewSeconds: number; mode: "device_identity"; }; contractDigest: string; contractId: string; deploymentId: string; instanceId: string; transport: { sentinel: { jwt: string; seed: string; }; }; transports: { native?: { natsServers: Array<string>; }; websocket?: { natsServers: Array<string>; }; }; }
- status: "ready"
- count: number
-
entries: Array<>{ activatedAt: string | null; createdAt: string; deploymentId: string; instanceId: string; metadata?: { [k: string]: string; }; publicIdentityKey: string; revokedAt: string | null; state: "registered" | "activated" | "revoked" | "disabled"; }
- limit: number
- nextOffset: number
- offset: number
| { contractId: string; kind: "cli"; sessionPublicKey: string; }
| { contractId: string; kind: "native"; sessionPublicKey: string; }
| { contractId: string; devicePublicKey: string; kind: "device-user"; }
- count: number
-
entries: Array<>{ answer: "approved" | "denied"; answeredAt: string; capabilities: { [k: string]: { consequence?: string; description: string; displayName: string; }; }; contractEvidence: { contractDigest: string; contractId: string; }; description: string; displayName: string; identityAnchor:{ contractId: string; kind: "web"; origin: string; }; identityGrantId: string; participantKind: "app" | "agent"; updatedAt: string; user: string; }
| { contractId: string; kind: "cli"; sessionPublicKey: string; }
| { contractId: string; kind: "native"; sessionPublicKey: string; }
| { contractId: string; devicePublicKey: string; kind: "device-user"; } - limit: number
- nextOffset: number
- offset: number
| { contractId: string; kind: "cli"; sessionPublicKey: string; }
| { contractId: string; kind: "native"; sessionPublicKey: string; }
| { contractId: string; devicePublicKey: string; kind: "device-user"; }
- count: number
-
entries: Array<>{ capabilities: Array<string>; contractEvidence: { contractDigest: string; contractId: string; }; description: string; displayName: string; grantedAt: string; identityAnchor:{ contractId: string; kind: "web"; origin: string; }; identityGrantId: string; participantKind: "app" | "agent"; updatedAt: string; }
| { contractId: string; kind: "cli"; sessionPublicKey: string; }
| { contractId: string; kind: "native"; sessionPublicKey: string; }
| { contractId: string; devicePublicKey: string; kind: "device-user"; } - limit: number
- nextOffset: number
- offset: number
- defaultCapabilities: Array<string>
- defaultCapabilityGroups: Array<string>
- federatedProviders: Array<{ displayName: string; id: string; type: string; }>
- portal: { builtIn: boolean; createdAt: string; disabled: boolean; displayName: string; entryUrl: string | null; portalId: string; updatedAt: string; }
-
routes: Array<>{ contractId: string | null; disabled: boolean; origin: string | null; portalId: string; routeKey: string; updatedAt: string; }
- settings: { allowedFederatedProviders: Array<string> | null; federatedRegistrationEnabled: boolean; localRegistrationEnabled: boolean; portalId: string; selfRegisteredAccountActive: boolean; updatedAt: string; }
- defaultCapabilities: Array<string>
- defaultCapabilityGroups: Array<string>
- federatedProviders: Array<{ displayName: string; id: string; type: string; }>
- portal: { builtIn: boolean; createdAt: string; disabled: boolean; displayName: string; entryUrl: string | null; portalId: string; updatedAt: string; }
- settings: { allowedFederatedProviders: Array<string> | null; federatedRegistrationEnabled: boolean; localRegistrationEnabled: boolean; portalId: string; selfRegisteredAccountActive: boolean; updatedAt: string; }
- defaultCapabilities: Array<string>
- defaultCapabilityGroups: Array<string>
- federatedProviders: Array<{ displayName: string; id: string; type: string; }>
- portal: { builtIn: boolean; createdAt: string; disabled: boolean; displayName: string; entryUrl: string | null; portalId: string; updatedAt: string; }
- settings: { allowedFederatedProviders: Array<string> | null; federatedRegistrationEnabled: boolean; localRegistrationEnabled: boolean; portalId: string; selfRegisteredAccountActive: boolean; updatedAt: string; }
| { active: boolean; capabilities: Array<string>; id: string; name: string; type: "service"; }
| { active: boolean; capabilities: Array<string>; deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; }
- allowed: boolean
-
caller: { active: boolean; capabilities: Array<string>; email: string; identity: { identityId: string; provider: string; subject: string; }; image?: string; lastAuth: string; name: string; participantKind: "app" | "agent"; type: "user"; userId: string; }
| { active: boolean; capabilities: Array<string>; id: string; name: string; type: "service"; }
| { active: boolean; capabilities: Array<string>; deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; } - inboxPrefix: string
- count: number
-
entries: Array<>{ capabilities: Array<string>; createdAt: string; deploymentId: string; disabled: boolean; instanceId: string; instanceKey: string; resourceBindings?: { eventConsumers?: { [k: string]: { ackWaitMs: number; backoffMs: Array<number>; concurrency: number; consumerName: string; filterSubjects: Array<string>; maxDeliver: number; ordering: "strict"; replay: "new" | "all"; stream: string; }; }; jobs?: { namespace: string; queues: { [k: string]: { ackWaitMs: number; backoffMs: Array<number>; concurrency: number; consumerName: string; defaultDeadlineMs?: number; dlq: boolean; keyConcurrency?: { heartbeatIntervalMs: number; heartbeatTtlMs: number; key: Array<string>; maxActive: number; stalePolicy: "fail-stale" | "block"; }; logs: boolean; maxDeliver: number; payload: { schema: string; }; progress: boolean; publishPrefix: string; queue?: { maxQueuedPerKey: number; whenFull: "reject" | "coalesce" | "replace-oldest"; }; queueType: string; result?: { schema: string; }; workSubject: string; }; }; workStream?: string; }; kv?: { [k: string]: { bucket: string; history: number; maxValueBytes?: number; ttlMs: number; }; }; store?: { [k: string]: { maxObjectBytes?: number; maxTotalBytes?: number; name: string; ttlMs: number; }; }; }; }
- limit: number
- nextOffset: number
- offset: number
| { contractDisplayName: string; contractId: string; createdAt: string; key: string; lastAuth: string; participantKind: "agent"; principal: { identity: { identityId: string; provider: string; subject: string; }; name: string; type: "user"; userId: string; }; sessionKey: string; }
| { contractDisplayName?: string; contractId: string; createdAt: string; key: string; lastAuth: string; participantKind: "device"; principal: { deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; }; sessionKey: string; }
| { createdAt: string; key: string; lastAuth: string; participantKind: "service"; principal: { deploymentId: string; id: string; instanceId: string; name: string; type: "service"; }; sessionKey: string; }
- count: number
-
entries: Array<>({ contractDisplayName: string; contractId: string; createdAt: string; key: string; lastAuth: string; participantKind: "app"; principal: { identity: { identityId: string; provider: string; subject: string; }; name: string; type: "user"; userId: string; }; sessionKey: string; })
| { contractDisplayName: string; contractId: string; createdAt: string; key: string; lastAuth: string; participantKind: "agent"; principal: { identity: { identityId: string; provider: string; subject: string; }; name: string; type: "user"; userId: string; }; sessionKey: string; }
| { contractDisplayName?: string; contractId: string; createdAt: string; key: string; lastAuth: string; participantKind: "device"; principal: { deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; }; sessionKey: string; }
| { createdAt: string; key: string; lastAuth: string; participantKind: "service"; principal: { deploymentId: string; id: string; instanceId: string; name: string; type: "service"; }; sessionKey: string; } - limit: number
- nextOffset: number
- offset: number
| null
| null
| null
-
device: { active: boolean; capabilities: Array<string>; deploymentId: string; deviceId: string; deviceType: string; runtimePublicKey: string; type: "device"; }
| null - participantKind: ("app" | "agent") | "device" | "service"
-
service: { active: boolean; capabilities: Array<string>; id: string; name: string; type: "service"; }
| null -
user: { active: boolean; capabilities: Array<string>; email: string; identity: { identityId: string; provider: string; subject: string; }; image?: string; lastLogin?: string; name: string; userId: string; }
| null
- count: number
-
entries: Array<>{ active: boolean; capabilities: Array<string>; capabilityGroups: Array<string>; email?: string; identities: Array<>; name?: string; userId: string; }{ displayName: string | null; email: string | null; emailVerified: boolean; identityId: string; lastLoginAt: string | null; linkedAt: string; provider: string; subject: string; }
- limit: number
- nextOffset: number
- offset: number
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { consequence: { minLength: number; type: string; }; contractDigest: { pattern: string; type: string; }; contractDisplayName: { minLength: number; type: string; }; contractId: { minLength: number; type: string; }; deploymentId: { minLength: number; type: string; }; description: { minLength: number; type: string; }; direction: { anyOf: { const: string; type: string; }[]; }; displayName: { minLength: number; type: string; }; key: { minLength: number; type: string; }; source: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { group: { properties: { capabilities: { items: { minLength: number; type: string; }; type: string; }; createdAt: { format: string; type: string; }; description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; groupKey: { minLength: number; type: string; }; includedGroups: { items: { minLength: number; type: string; }; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { capabilities: { items: { minLength: number; type: string; }; type: string; }; createdAt: { format: string; type: string; }; description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; groupKey: { minLength: number; type: string; }; includedGroups: { items: { minLength: number; type: string; }; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { capabilities: { items: { minLength: number; type: string; }; type: string; }; description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; groupKey: { minLength: number; type: string; }; includedGroups: { items: { minLength: number; type: string; }; type: string; }; }
- required: string[]
- type: string
- properties: { group: { properties: { capabilities: { items: { minLength: number; type: string; }; type: string; }; createdAt: { format: string; type: string; }; description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; groupKey: { minLength: number; type: string; }; includedGroups: { items: { minLength: number; type: string; }; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
| { properties: { clientId: { type: string; }; connectedAt: { type: string; }; contractDisplayName: { type: string; }; contractId: { type: string; }; key: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; deviceId: { type: string; }; deviceType: { type: string; }; runtimePublicKey: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; serverId: { type: string; }; sessionKey: { type: string; }; userNkey: { type: string; }; }; required: string[]; type: string; }
| { properties: { clientId: { type: string; }; connectedAt: { type: string; }; key: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; id: { type: string; }; instanceId: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; serverId: { type: string; }; sessionKey: { type: string; }; userNkey: { type: string; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { anyOf: { properties: { clientId: { type: string; }; connectedAt: { type: string; }; contractDisplayName: { type: string; }; contractId: { type: string; }; key: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { identity: { properties: { identityId: { type: string; }; provider: { type: string; }; subject: { type: string; }; }; required: string[]; type: string; }; name: { type: string; }; type: { const: string; type: string; }; userId: { type: string; }; }; required: string[]; type: string; }; serverId: { type: string; }; sessionKey: { type: string; }; userNkey: { type: string; }; }; required: string[]; type: string; }[]; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { clientId: { type: string; }; connectedAt: { type: string; }; contractDisplayName: { type: string; }; contractId: { type: string; }; key: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; deviceId: { type: string; }; deviceType: { type: string; }; runtimePublicKey: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; serverId: { type: string; }; sessionKey: { type: string; }; userNkey: { type: string; }; }; required: string[]; type: string; }
| { properties: { clientId: { type: string; }; connectedAt: { type: string; }; key: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; id: { type: string; }; instanceId: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; serverId: { type: string; }; sessionKey: { type: string; }; userNkey: { type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }
-
properties: { deployment: { anyOf: { properties: { contractCompatibilityMode: { anyOf: { const: string; type: string; }[]; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; namespaces: { items: { minLength: number; type: string; }; type: string; }; }; required: string[]; type: string; }[]; }; }
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }
-
properties: { deployment: { anyOf: { properties: { contractCompatibilityMode: { anyOf: { const: string; type: string; }[]; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; namespaces: { items: { minLength: number; type: string; }; type: string; }; }; required: string[]; type: string; }[]; }; }
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }
-
properties: { deployment: { anyOf: { properties: { contractCompatibilityMode: { anyOf: { const: string; type: string; }[]; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; namespaces: { items: { minLength: number; type: string; }; type: string; }; }; required: string[]; type: string; }[]; }; }
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { anyOf: { properties: { contractCompatibilityMode: { anyOf: { const: string; type: string; }[]; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; namespaces: { items: { minLength: number; type: string; }; type: string; }; }; required: string[]; type: string; }[]; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; kind: { const: string; type: string; }; reviewMode: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; } - required: string[]
- type: string
- properties: { connectInfo: { properties: { auth: { properties: { authority: { anyOf: { const: string; type: string; }[]; }; iatSkewSeconds: { type: string; }; mode: { const: string; type: string; }; }; required: string[]; type: string; }; contractDigest: { pattern: string; type: string; }; contractId: { minLength: number; type: string; }; deploymentId: { minLength: number; type: string; }; instanceId: { minLength: number; type: string; }; transport: { properties: { sentinel: { properties: { jwt: { type: string; }; seed: { type: string; }; }; required: string[]; type: string; }; }; required: string[]; type: string; }; transports: { properties: { native: { properties: { natsServers: { items: { minLength: number; type: string; }; minItems: number; type: string; }; }; required: string[]; type: string; }; websocket: { properties: { natsServers: { items: { minLength: number; type: string; }; minItems: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; required: string[]; type: string; }; status: { const: string; type: string; }; }
- required: string[]
- type: string
- properties: { instance: { properties: { activatedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; instanceId: { minLength: number; type: string; }; metadata: { patternProperties: { ^.*$: { minLength: number; type: string; }; }; type: string; }; publicIdentityKey: { minLength: number; type: string; }; revokedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; state: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { instance: { properties: { activatedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; instanceId: { minLength: number; type: string; }; metadata: { patternProperties: { ^.*$: { minLength: number; type: string; }; }; type: string; }; publicIdentityKey: { minLength: number; type: string; }; revokedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; state: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { activatedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; instanceId: { minLength: number; type: string; }; metadata: { patternProperties: { ^.*$: { minLength: number; type: string; }; }; type: string; }; publicIdentityKey: { minLength: number; type: string; }; revokedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; state: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { activationKey: { minLength: number; type: string; }; deploymentId: { minLength: number; type: string; }; metadata: { patternProperties: { ^.*$: { minLength: number; type: string; }; }; type: string; }; publicIdentityKey: { minLength: number; type: string; }; }
- required: string[]
- type: string
- properties: { instance: { properties: { activatedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; instanceId: { minLength: number; type: string; }; metadata: { patternProperties: { ^.*$: { minLength: number; type: string; }; }; type: string; }; publicIdentityKey: { minLength: number; type: string; }; revokedAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; state: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
| { properties: { contractId: { minLength: number; type: string; }; kind: { const: string; type: string; }; sessionPublicKey: { minLength: number; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; devicePublicKey: { minLength: number; type: string; }; kind: { const: string; type: string; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { answer: { anyOf: { const: string; type: string; }[]; }; answeredAt: { format: string; type: string; }; capabilities: { patternProperties: { ^.*$: { properties: { consequence: { type: string; }; description: { type: string; }; displayName: { type: string; }; }; required: string[]; type: string; }; }; type: string; }; contractEvidence: { properties: { contractDigest: { pattern: string; type: string; }; contractId: { minLength: number; type: string; }; }; required: string[]; type: string; }; description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; identityAnchor: { anyOf: { properties: { contractId: { minLength: number; type: string; }; kind: { const: string; type: string; }; origin: { minLength: number; type: string; }; }; required: string[]; type: string; }[]; }; identityGrantId: { minLength: number; type: string; }; participantKind: { anyOf: { const: string; type: string; }[]; }; updatedAt: { format: string; type: string; }; user: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { contractId: { minLength: number; type: string; }; kind: { const: string; type: string; }; sessionPublicKey: { minLength: number; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; devicePublicKey: { minLength: number; type: string; }; kind: { const: string; type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { properties: { contractId: { minLength: number; type: string; }; kind: { const: string; type: string; }; sessionPublicKey: { minLength: number; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; devicePublicKey: { minLength: number; type: string; }; kind: { const: string; type: string; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { capabilities: { items: { type: string; }; type: string; }; contractEvidence: { properties: { contractDigest: { pattern: string; type: string; }; contractId: { minLength: number; type: string; }; }; required: string[]; type: string; }; description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; grantedAt: { format: string; type: string; }; identityAnchor: { anyOf: { properties: { contractId: { minLength: number; type: string; }; kind: { const: string; type: string; }; origin: { minLength: number; type: string; }; }; required: string[]; type: string; }[]; }; identityGrantId: { minLength: number; type: string; }; participantKind: { anyOf: { const: string; type: string; }[]; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { contractId: { minLength: number; type: string; }; kind: { const: string; type: string; }; sessionPublicKey: { minLength: number; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; devicePublicKey: { minLength: number; type: string; }; kind: { const: string; type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { type: string; }
-
properties: { defaultCapabilities: { items: { minLength: number; type: string; }; type: string; }; defaultCapabilityGroups: { items: { minLength: number; type: string; }; type: string; }; federatedProviders: { items: { properties: { displayName: { minLength: number; type: string; }; id: { minLength: number; type: string; }; type: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; portal: { properties: { builtIn: { type: string; }; createdAt: { format: string; type: string; }; disabled: { type: string; }; displayName: { minLength: number; type: string; }; entryUrl: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; portalId: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; routes: { items: { properties: { contractId: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; disabled: { type: string; }; origin: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; portalId: { minLength: number; type: string; }; routeKey: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; settings: { properties: { allowedFederatedProviders: { anyOf: { items: { minLength: number; type: string; }; type: string; }[]; }; federatedRegistrationEnabled: { type: string; }; localRegistrationEnabled: { type: string; }; portalId: { minLength: number; type: string; }; selfRegisteredAccountActive: { type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
| { type: string; } - required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { activeRouteCount: { minimum: number; type: string; }; builtIn: { type: string; }; createdAt: { format: string; type: string; }; disabled: { type: string; }; displayName: { minLength: number; type: string; }; entryUrl: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; portalId: { minLength: number; type: string; }; routeCount: { minimum: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
| { type: string; }
-
properties: { defaultCapabilities: { items: { minLength: number; type: string; }; type: string; }; defaultCapabilityGroups: { items: { minLength: number; type: string; }; type: string; }; federatedProviders: { items: { properties: { displayName: { minLength: number; type: string; }; id: { minLength: number; type: string; }; type: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; portal: { properties: { builtIn: { type: string; }; createdAt: { format: string; type: string; }; disabled: { type: string; }; displayName: { minLength: number; type: string; }; entryUrl: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; portalId: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; settings: { properties: { allowedFederatedProviders: { anyOf: { items: { minLength: number; type: string; }; type: string; }[]; }; federatedRegistrationEnabled: { type: string; }; localRegistrationEnabled: { type: string; }; portalId: { minLength: number; type: string; }; selfRegisteredAccountActive: { type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
| { type: string; } - required: string[]
- type: string
| { type: string; }
-
properties: { allowedFederatedProviders: { anyOf: { items: { minLength: number; type: string; }; type: string; }[]; }; defaultCapabilities: { items: { minLength: number; type: string; }; type: string; }; defaultCapabilityGroups: { items: { minLength: number; type: string; }; type: string; }; federatedRegistrationEnabled: { type: string; }; localRegistrationEnabled: { type: string; }; portalId: { minLength: number; type: string; }; selfRegisteredAccountActive: { type: string; }; }
| { type: string; } - required: string[]
- type: string
- properties: { portal: { properties: { builtIn: { type: string; }; createdAt: { format: string; type: string; }; disabled: { type: string; }; displayName: { minLength: number; type: string; }; entryUrl: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; portalId: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { route: { properties: { contractId: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; disabled: { type: string; }; origin: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; portalId: { minLength: number; type: string; }; routeKey: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { capabilities: { items: { minLength: number; type: string; }; type: string; }; iat: { type: string; }; payloadHash: { minLength: number; type: string; }; proof: { minLength: number; type: string; }; requestId: { minLength: number; type: string; }; sessionKey: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }
- required: string[]
- type: string
| { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; id: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; deploymentId: { minLength: number; type: string; }; deviceId: { minLength: number; type: string; }; deviceType: { minLength: number; type: string; }; runtimePublicKey: { minLength: number; type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }
-
properties: { allowed: { type: string; }; caller: { anyOf: { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; email: { type: string; }; identity: { properties: { identityId: { minLength: number; type: string; }; provider: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }; required: string[]; type: string; }; image: { type: string; }; lastAuth: { format: string; type: string; }; name: { type: string; }; participantKind: { anyOf: { const: string; type: string; }[]; }; type: { const: string; type: string; }; userId: { minLength: number; type: string; }; }; required: string[]; type: string; }[]; }; inboxPrefix: { type: string; }; }
| { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; id: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; deploymentId: { minLength: number; type: string; }; deviceId: { minLength: number; type: string; }; deviceType: { minLength: number; type: string; }; runtimePublicKey: { minLength: number; type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
- properties: { instance: { properties: { capabilities: { items: { type: string; }; type: string; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; instanceId: { minLength: number; type: string; }; instanceKey: { minLength: number; type: string; }; resourceBindings: { properties: { eventConsumers: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; filterSubjects: { items: { minLength: number; type: string; }; type: string; }; maxDeliver: { minimum: number; type: string; }; ordering: { const: string; type: string; }; replay: { anyOf: { const: string; type: string; }[]; }; stream: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; jobs: { properties: { namespace: { minLength: number; type: string; }; queues: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; defaultDeadlineMs: { minimum: number; type: string; }; dlq: { type: string; }; keyConcurrency: { properties: { heartbeatIntervalMs: { minimum: number; type: string; }; heartbeatTtlMs: { minimum: number; type: string; }; key: { items: { minLength: number; type: string; }; minItems: number; type: string; }; maxActive: { minimum: number; type: string; }; stalePolicy: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; logs: { type: string; }; maxDeliver: { minimum: number; type: string; }; payload: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; progress: { type: string; }; publishPrefix: { minLength: number; type: string; }; queue: { properties: { maxQueuedPerKey: { minimum: number; type: string; }; whenFull: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; queueType: { minLength: number; type: string; }; result: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; workSubject: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; workStream: { minLength: number; type: string; }; }; required: string[]; type: string; }; kv: { patternProperties: { ^.*$: { properties: { bucket: { minLength: number; type: string; }; history: { minimum: number; type: string; }; maxValueBytes: { minimum: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; store: { patternProperties: { ^.*$: { properties: { maxObjectBytes: { minimum: number; type: string; }; maxTotalBytes: { minimum: number; type: string; }; name: { minLength: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { instance: { properties: { capabilities: { items: { type: string; }; type: string; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; instanceId: { minLength: number; type: string; }; instanceKey: { minLength: number; type: string; }; resourceBindings: { properties: { eventConsumers: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; filterSubjects: { items: { minLength: number; type: string; }; type: string; }; maxDeliver: { minimum: number; type: string; }; ordering: { const: string; type: string; }; replay: { anyOf: { const: string; type: string; }[]; }; stream: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; jobs: { properties: { namespace: { minLength: number; type: string; }; queues: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; defaultDeadlineMs: { minimum: number; type: string; }; dlq: { type: string; }; keyConcurrency: { properties: { heartbeatIntervalMs: { minimum: number; type: string; }; heartbeatTtlMs: { minimum: number; type: string; }; key: { items: { minLength: number; type: string; }; minItems: number; type: string; }; maxActive: { minimum: number; type: string; }; stalePolicy: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; logs: { type: string; }; maxDeliver: { minimum: number; type: string; }; payload: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; progress: { type: string; }; publishPrefix: { minLength: number; type: string; }; queue: { properties: { maxQueuedPerKey: { minimum: number; type: string; }; whenFull: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; queueType: { minLength: number; type: string; }; result: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; workSubject: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; workStream: { minLength: number; type: string; }; }; required: string[]; type: string; }; kv: { patternProperties: { ^.*$: { properties: { bucket: { minLength: number; type: string; }; history: { minimum: number; type: string; }; maxValueBytes: { minimum: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; store: { patternProperties: { ^.*$: { properties: { maxObjectBytes: { minimum: number; type: string; }; maxTotalBytes: { minimum: number; type: string; }; name: { minLength: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { capabilities: { items: { type: string; }; type: string; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; instanceId: { minLength: number; type: string; }; instanceKey: { minLength: number; type: string; }; resourceBindings: { properties: { eventConsumers: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; filterSubjects: { items: { minLength: number; type: string; }; type: string; }; maxDeliver: { minimum: number; type: string; }; ordering: { const: string; type: string; }; replay: { anyOf: { const: string; type: string; }[]; }; stream: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; jobs: { properties: { namespace: { minLength: number; type: string; }; queues: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; defaultDeadlineMs: { minimum: number; type: string; }; dlq: { type: string; }; keyConcurrency: { properties: { heartbeatIntervalMs: { minimum: number; type: string; }; heartbeatTtlMs: { minimum: number; type: string; }; key: { items: { minLength: number; type: string; }; minItems: number; type: string; }; maxActive: { minimum: number; type: string; }; stalePolicy: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; logs: { type: string; }; maxDeliver: { minimum: number; type: string; }; payload: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; progress: { type: string; }; publishPrefix: { minLength: number; type: string; }; queue: { properties: { maxQueuedPerKey: { minimum: number; type: string; }; whenFull: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; queueType: { minLength: number; type: string; }; result: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; workSubject: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; workStream: { minLength: number; type: string; }; }; required: string[]; type: string; }; kv: { patternProperties: { ^.*$: { properties: { bucket: { minLength: number; type: string; }; history: { minimum: number; type: string; }; maxValueBytes: { minimum: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; store: { patternProperties: { ^.*$: { properties: { maxObjectBytes: { minimum: number; type: string; }; maxTotalBytes: { minimum: number; type: string; }; name: { minLength: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { instance: { properties: { capabilities: { items: { type: string; }; type: string; }; createdAt: { format: string; type: string; }; deploymentId: { minLength: number; type: string; }; disabled: { type: string; }; instanceId: { minLength: number; type: string; }; instanceKey: { minLength: number; type: string; }; resourceBindings: { properties: { eventConsumers: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; filterSubjects: { items: { minLength: number; type: string; }; type: string; }; maxDeliver: { minimum: number; type: string; }; ordering: { const: string; type: string; }; replay: { anyOf: { const: string; type: string; }[]; }; stream: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; jobs: { properties: { namespace: { minLength: number; type: string; }; queues: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; defaultDeadlineMs: { minimum: number; type: string; }; dlq: { type: string; }; keyConcurrency: { properties: { heartbeatIntervalMs: { minimum: number; type: string; }; heartbeatTtlMs: { minimum: number; type: string; }; key: { items: { minLength: number; type: string; }; minItems: number; type: string; }; maxActive: { minimum: number; type: string; }; stalePolicy: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; logs: { type: string; }; maxDeliver: { minimum: number; type: string; }; payload: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; progress: { type: string; }; publishPrefix: { minLength: number; type: string; }; queue: { properties: { maxQueuedPerKey: { minimum: number; type: string; }; whenFull: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; queueType: { minLength: number; type: string; }; result: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; workSubject: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; workStream: { minLength: number; type: string; }; }; required: string[]; type: string; }; kv: { patternProperties: { ^.*$: { properties: { bucket: { minLength: number; type: string; }; history: { minimum: number; type: string; }; maxValueBytes: { minimum: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; store: { patternProperties: { ^.*$: { properties: { maxObjectBytes: { minimum: number; type: string; }; maxTotalBytes: { minimum: number; type: string; }; name: { minLength: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
| { properties: { contractDisplayName: { type: string; }; contractId: { type: string; }; createdAt: { type: string; }; key: { type: string; }; lastAuth: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; deviceId: { type: string; }; deviceType: { type: string; }; runtimePublicKey: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; sessionKey: { type: string; }; }; required: string[]; type: string; }
| { properties: { createdAt: { type: string; }; key: { type: string; }; lastAuth: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; id: { type: string; }; instanceId: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; sessionKey: { type: string; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { anyOf: { properties: { contractDisplayName: { type: string; }; contractId: { type: string; }; createdAt: { type: string; }; key: { type: string; }; lastAuth: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { identity: { properties: { identityId: { type: string; }; provider: { type: string; }; subject: { type: string; }; }; required: string[]; type: string; }; name: { type: string; }; type: { const: string; type: string; }; userId: { type: string; }; }; required: string[]; type: string; }; sessionKey: { type: string; }; }; required: string[]; type: string; }[]; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { contractDisplayName: { type: string; }; contractId: { type: string; }; createdAt: { type: string; }; key: { type: string; }; lastAuth: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; deviceId: { type: string; }; deviceType: { type: string; }; runtimePublicKey: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; sessionKey: { type: string; }; }; required: string[]; type: string; }
| { properties: { createdAt: { type: string; }; key: { type: string; }; lastAuth: { type: string; }; participantKind: { const: string; type: string; }; principal: { properties: { deploymentId: { type: string; }; id: { type: string; }; instanceId: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }; sessionKey: { type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { type: string; }
| { const: string; type: string; }
| { type: string; }
| { type: string; }
-
properties: { device: { anyOf: { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; deploymentId: { minLength: number; type: string; }; deviceId: { minLength: number; type: string; }; deviceType: { minLength: number; type: string; }; runtimePublicKey: { minLength: number; type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }[]; }; participantKind: { anyOf:
| { type: string; }{ anyOf: { const: string; type: string; }[]; }[]; }; service: { anyOf:
| { const: string; type: string; }{ properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; id: { type: string; }; name: { type: string; }; type: { const: string; type: string; }; }; required: string[]; type: string; }[]; }; user: { anyOf:
| { type: string; }{ properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; email: { type: string; }; identity: { properties: { identityId: { minLength: number; type: string; }; provider: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }; required: string[]; type: string; }; image: { type: string; }; lastLogin: { format: string; type: string; }; name: { type: string; }; userId: { minLength: number; type: string; }; }; required: string[]; type: string; }[]; }; }
| { type: string; } - required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { displayName: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; email: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; emailVerified: { type: string; }; identityId: { minLength: number; type: string; }; lastLoginAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; linkedAt: { format: string; type: string; }; provider: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { active: { type: string; }; capabilities: { items: { minLength: number; type: string; }; type: string; }; capabilityGroups: { items: { minLength: number; type: string; }; type: string; }; email: { minLength: number; type: string; }; name: { minLength: number; type: string; }; username: { minLength: number; type: string; }; }
- type: string
- properties: { user: { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; capabilityGroups: { items: { type: string; }; type: string; }; email: { type: string; }; identities: { items: { properties: { displayName: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; email: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; emailVerified: { type: string; }; identityId: { minLength: number; type: string; }; lastLoginAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; linkedAt: { format: string; type: string; }; provider: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; name: { type: string; }; userId: { minLength: number; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { user: { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; capabilityGroups: { items: { type: string; }; type: string; }; email: { type: string; }; identities: { items: { properties: { displayName: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; email: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; emailVerified: { type: string; }; identityId: { minLength: number; type: string; }; lastLoginAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; linkedAt: { format: string; type: string; }; provider: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; name: { type: string; }; userId: { minLength: number; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { default; items: { properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; capabilityGroups: { items: { type: string; }; type: string; }; email: { type: string; }; identities: { items: { properties: { displayName: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; email: { anyOf: { minLength: number; type: string; } | { type: string; }[]; }; emailVerified: { type: string; }; identityId: { minLength: number; type: string; }; lastLoginAt: { anyOf: { format: string; type: string; } | { type: string; }[]; }; linkedAt: { format: string; type: string; }; provider: { minLength: number; type: string; }; subject: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; name: { type: string; }; userId: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { active: { type: string; }; capabilities: { items: { type: string; }; type: string; }; capabilityGroups: { items: { minLength: number; type: string; }; type: string; }; email: { type: string; }; name: { type: string; }; userId: { minLength: number; type: string; }; }
- required: string[]
- type: string
- properties: { checks: { items: { properties: { error: { type: string; }; info: { patternProperties: { ^.*$; }; type: string; }; latencyMs: { type: string; }; name: { type: string; }; status: { anyOf: { const: string; type: string; }[]; }; summary: { type: string; }; }; required: string[]; type: string; }; type: string; }; service: { type: string; }; status: { anyOf: { const: string; type: string; }[]; }; timestamp: { format: string; type: string; }; }
- required: string[]
- type: string
- events: { Auth.Connections.Closed: { subject: string; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.Connections.Kicked: { subject: string; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.Connections.Opened: { subject: string; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.DeviceUserAuthorities.Approved: { subject: string; params: "/deploymentId"[]; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.DeviceUserAuthorities.Requested: { subject: string; params: "/deploymentId"[]; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.DeviceUserAuthorities.Resolved: { subject: string; params: "/deploymentId"[]; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.DeviceUserAuthorities.ReviewRequested: { subject: string; params: "/deploymentId"[]; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; Auth.Sessions.Revoked: { subject: string; event; publishCapabilities: string[]; subscribeCapabilities: string[]; }; }
- feeds
- operations: { Auth.DeviceUserAuthorities.Resolve: { subject: string; input; progress; output; callerCapabilities; observeCapabilities; cancelCapabilities; controlCapabilities; }; }
- rpc: { Auth.Capabilities.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.CapabilityGroups.Delete: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.CapabilityGroups.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.CapabilityGroups.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.CapabilityGroups.Put: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.CatalogIssues.Resolve: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Connections.Kick: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Connections.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.AcceptMigration: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.AcceptUpdate: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.GrantOverrides.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.GrantOverrides.Put: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.GrantOverrides.Remove: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.Plan: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.Plans.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.Plans.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError"[]; }; Auth.DeploymentAuthority.Reconcile: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeploymentAuthority.Reject: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Deployments.Create: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Deployments.Disable: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Deployments.Enable: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Deployments.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Deployments.Remove: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeviceUserAuthorities.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeviceUserAuthorities.Reviews.Decide: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeviceUserAuthorities.Reviews.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.DeviceUserAuthorities.Revoke: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Devices.ConnectInfo.Get: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Devices.Disable: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Devices.Enable: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Devices.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Devices.Provision: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Devices.Remove: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Health: { subject: string; input; output; callerCapabilities; errors: "UnexpectedError"[]; declaredErrorTypes: "UnexpectedError"[]; }; Auth.Identities.List: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.IdentityGrants.List: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError"[]; }; Auth.IdentityGrants.Revoke: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError"[]; }; Auth.Portals.LoginSettings.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.LoginSettings.Update: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.Put: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.Remove: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.Routes.Put: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Portals.Routes.Remove: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Requests.Validate: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.ServiceInstances.Disable: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.ServiceInstances.Enable: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.ServiceInstances.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.ServiceInstances.Provision: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.ServiceInstances.Remove: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Sessions.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Sessions.Logout: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError"[]; }; Auth.Sessions.Me: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError"[]; }; Auth.Sessions.Revoke: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.UserIdentities.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.UserIdentities.Unlink: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.Create: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.IdentityLink.Create: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.Password.Change: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.PasswordReset.Create: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; Auth.Users.Update: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; }
- subjects
- Trellis.Bindings.Get: { input: TrellisBindingsGetInput; output: TrellisBindingsGetOutput; }
- Trellis.Catalog: { input: TrellisCatalogInput; output: TrellisCatalogOutput; }
- Trellis.Contract.Get: { input: TrellisContractGetInput; output: TrellisContractGetOutput; }
- Trellis.Surface.Status: { input: TrellisSurfaceStatusInput; output: TrellisSurfaceStatusOutput; }
- feed: { }
- operation: { }
-
rpc: { readonly trellis: { catalog(handler: RpcHandler<>): Promise<void>; contractGet(handler: RpcHandler<Types.TrellisCatalogInput,Types.TrellisCatalogOutput,TDeps>): Promise<void>; surfaceStatus(handler: RpcHandler<Types.TrellisContractGetInput,Types.TrellisContractGetOutput,TDeps>): Promise<void>; }; }Types.TrellisSurfaceStatusInput,Types.TrellisSurfaceStatusOutput,TDeps
- api: Api
- connection: TrellisConnection
- event: { }
- feed: { }
- name: string
- operation: { }
-
rpc: { readonly trellis: { catalog(): AsyncResult<Types.TrellisCatalogOutput, BaseError>; contractGet(input: Types.TrellisCatalogInput,opts?: RequestOpts): AsyncResult<Types.TrellisContractGetOutput, BaseError>; surfaceStatus(input: Types.TrellisContractGetInput,opts?: RequestOpts): AsyncResult<Types.TrellisSurfaceStatusOutput, BaseError>; }; }input: Types.TrellisSurfaceStatusInput,opts?: RequestOpts
- state: TrellisCoreState
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
- binding: { contractId: string; digest: string; resources: { eventConsumers?: { [k: string]: { ackWaitMs: number; backoffMs: Array<number>; concurrency: number; consumerName: string; filterSubjects: Array<string>; maxDeliver: number; ordering: "strict"; replay: "new" | "all"; stream: string; }; }; jobs?: { namespace: string; queues: { [k: string]: { ackWaitMs: number; backoffMs: Array<number>; concurrency: number; consumerName: string; defaultDeadlineMs?: number; dlq: boolean; keyConcurrency?: { heartbeatIntervalMs: number; heartbeatTtlMs: number; key: Array<string>; maxActive: number; stalePolicy: "fail-stale" | "block"; }; logs: boolean; maxDeliver: number; payload: { schema: string; }; progress: boolean; publishPrefix: string; queue?: { maxQueuedPerKey: number; whenFull: "reject" | "coalesce" | "replace-oldest"; }; queueType: string; result?: { schema: string; }; workSubject: string; }; }; workStream?: string; }; kv?: { [k: string]: { bucket: string; history: number; maxValueBytes?: number; ttlMs: number; }; }; store?: { [k: string]: { maxObjectBytes?: number; maxTotalBytes?: number; name: string; ttlMs: number; }; }; }; }
- eventConsumers: { [k: string]: { ackWaitMs: number; backoffMs: Array<number>; concurrency: number; consumerName: string; filterSubjects: Array<string>; maxDeliver: number; ordering: "strict"; replay: "new" | "all"; stream: string; }; }
- events
- feeds
- operations
- rpc: { Trellis.Bindings.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; Trellis.Catalog: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; Trellis.Contract.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; Trellis.Surface.Status: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; }
- subjects
- properties: { binding: { properties: { contractId: { minLength: number; type: string; }; digest: { pattern: string; type: string; }; resources: { properties: { eventConsumers: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; filterSubjects: { items: { minLength: number; type: string; }; type: string; }; maxDeliver: { minimum: number; type: string; }; ordering: { const: string; type: string; }; replay: { anyOf: { const: string; type: string; }[]; }; stream: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; jobs: { properties: { namespace: { minLength: number; type: string; }; queues: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; defaultDeadlineMs: { minimum: number; type: string; }; dlq: { type: string; }; keyConcurrency: { properties: { heartbeatIntervalMs: { minimum: number; type: string; }; heartbeatTtlMs: { minimum: number; type: string; }; key: { items: { minLength: number; type: string; }; minItems: number; type: string; }; maxActive: { minimum: number; type: string; }; stalePolicy: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; logs: { type: string; }; maxDeliver: { minimum: number; type: string; }; payload: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; progress: { type: string; }; publishPrefix: { minLength: number; type: string; }; queue: { properties: { maxQueuedPerKey: { minimum: number; type: string; }; whenFull: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; queueType: { minLength: number; type: string; }; result: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; workSubject: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; workStream: { minLength: number; type: string; }; }; required: string[]; type: string; }; kv: { patternProperties: { ^.*$: { properties: { bucket: { minLength: number; type: string; }; history: { minimum: number; type: string; }; maxValueBytes: { minimum: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; store: { patternProperties: { ^.*$: { properties: { maxObjectBytes: { minimum: number; type: string; }; maxTotalBytes: { minimum: number; type: string; }; name: { minLength: number; type: string; }; ttlMs: { minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; type: string; }; }; required: string[]; type: string; }; eventConsumers: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; consumerName: { minLength: number; type: string; }; filterSubjects: { items: { minLength: number; type: string; }; type: string; }; maxDeliver: { minimum: number; type: string; }; ordering: { const: string; type: string; }; replay: { anyOf: { const: string; type: string; }[]; }; stream: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }
- type: string
- properties: { catalog: { properties: { contracts: { items: { properties: { description: { minLength: number; type: string; }; digest: { type: string; }; displayName: { minLength: number; type: string; }; id: { type: string; }; }; required: string[]; type: string; }; type: string; }; format: { const: string; type: string; }; issues: { items: { properties: { actions: { items: { properties: { action: { anyOf: { const: string; type: string; }[]; }; deploymentIds: { items: { type: string; }; type: string; }; description: { minLength: number; type: string; }; digests: { items: { type: string; }; type: string; }; label: { minLength: number; type: string; }; risk: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; type: string; }; conflictingDeploymentIds: { items: { type: string; }; type: string; }; conflictingDigest: { type: string; }; conflictingDigests: { items: { type: string; }; type: string; }; contractId: { type: string; }; deploymentIds: { items: { type: string; }; type: string; }; digest: { type: string; }; effectiveDeploymentIds: { items: { type: string; }; type: string; }; effectiveDigests: { items: { type: string; }; type: string; }; issueId: { minLength: number; type: string; }; kind: { anyOf: { const: string; type: string; }[]; }; message: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { contract: { properties: { description: { minLength: number; type: string; }; displayName: { minLength: number; type: string; }; docs: { properties: { markdown: { type: string; }; summary: { type: string; }; }; required: string[]; type: string; }; errors: { patternProperties: { ^.*$: { type: string; }; }; type: string; }; events: { patternProperties: { ^.*$: { type: string; }; }; type: string; }; exports: { properties: { schemas: { items: { minLength: number; type: string; }; type: string; }; }; type: string; }; format: { const: string; type: string; }; id: { minLength: number; type: string; }; jobs: { patternProperties: { ^.*$: { properties: { ackWaitMs: { minimum: number; type: string; }; backoffMs: { items: { minimum: number; type: string; }; type: string; }; concurrency: { minimum: number; type: string; }; defaultDeadlineMs: { minimum: number; type: string; }; dlq: { type: string; }; docs: { properties: { markdown: { type: string; }; summary: { type: string; }; }; required: string[]; type: string; }; keyConcurrency: { properties: { heartbeatIntervalMs: { minimum: number; type: string; }; heartbeatTtlMs: { minimum: number; type: string; }; key: { items: { minLength: number; type: string; }; minItems: number; type: string; }; maxActive: { minimum: number; type: string; }; stalePolicy: { anyOf: { const: string; type: string; }[]; }; }; required: string[]; type: string; }; logs: { type: string; }; maxDeliver: { minimum: number; type: string; }; payload: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; progress: { type: string; }; queue: { properties: { maxQueuedPerKey: { minimum: number; type: string; }; whenFull: { anyOf: { const: string; type: string; }[]; }; }; type: string; }; result: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; required: string[]; type: string; }; }; type: string; }; kind: { anyOf: { const: string; type: string; }[]; }; operations: { patternProperties: { ^.*$: { type: string; }; }; type: string; }; resources: { additionalProperties: boolean; properties: { kv: { patternProperties: { ^.*$: { properties: { docs: { properties: { markdown: { type: string; }; summary: { type: string; }; }; required: string[]; type: string; }; history: { default: number; minimum: number; type: string; }; maxValueBytes: { minimum: number; type: string; }; purpose: { minLength: number; type: string; }; required: { default: boolean; type: string; }; schema: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; ttlMs: { default: number; minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; store: { patternProperties: { ^.*$: { properties: { docs: { properties: { markdown: { type: string; }; summary: { type: string; }; }; required: string[]; type: string; }; maxObjectBytes: { minimum: number; type: string; }; maxTotalBytes: { minimum: number; type: string; }; purpose: { minLength: number; type: string; }; required: { default: boolean; type: string; }; ttlMs: { default: number; minimum: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; }; type: string; }; rpc: { patternProperties: { ^.*$: { type: string; }; }; type: string; }; schemas: { patternProperties: { ^.*$: { anyOf: { type: string; }[]; }; }; type: string; }; state: { patternProperties: { ^.*$: { properties: { acceptedVersions: { patternProperties: { ^.*$: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; docs: { properties: { markdown: { type: string; }; summary: { type: string; }; }; required: string[]; type: string; }; kind: { anyOf: { const: string; type: string; }[]; }; schema: { properties: { schema: { minLength: number; type: string; }; }; required: string[]; type: string; }; stateVersion: { minLength: number; type: string; }; }; required: string[]; type: string; }; }; type: string; }; uses: { patternProperties: { ^.*$: { type: string; }; }; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
| { properties: { reason: { anyOf: { const: string; type: string; }[]; }; state: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { missingCapabilities: { items: { type: string; }; type: string; }; state: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; state: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; kind: { minLength: number; type: string; }; state: { const: string; type: string; }; surface: { minLength: number; type: string; }; }; required: string[]; type: string; }
-
properties: { status: { anyOf: { properties: { liveImplementer: { type: string; }; runtime: { anyOf: { const: string; type: string; }[]; }; state: { const: string; type: string; }; }; required: string[]; type: string; }[]; }; }
| { properties: { reason: { anyOf: { const: string; type: string; }[]; }; state: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { missingCapabilities: { items: { type: string; }; type: string; }; state: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; state: { const: string; type: string; }; }; required: string[]; type: string; }
| { properties: { contractId: { minLength: number; type: string; }; kind: { minLength: number; type: string; }; state: { const: string; type: string; }; surface: { minLength: number; type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
- api: Api
- connection: TrellisConnection
-
event: { readonly health: { heartbeat: { publish(event: Types.HealthHeartbeatEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Types.HealthHeartbeatEvent): Result<>; listen(PreparedTrellisEvent<Types.HealthHeartbeatEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; }; }handler: EventCallback<Types.HealthHeartbeatEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts
- feed: { }
- name: string
- operation: { }
- rpc: { }
- state: TrellisHealthState
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
-
checks: Array<>{ error?: string; info?: { [k: string]: unknown; }; latencyMs: number; name: string; status: "ok" | "failed"; summary?: string; }
- service: { contractDigest: string; contractId: string; info?: { [k: string]: unknown; }; instanceId: string; kind: "service" | "device"; name: string; publishIntervalMs: number; runtime: "deno" | "node" | "rust" | "unknown"; runtimeVersion?: string; startedAt: string; version?: string; }
- status: "healthy" | "unhealthy" | "degraded"
- summary: string
- properties: { checks: { items: { properties: { error: { type: string; }; info: { patternProperties: { ^.*$; }; type: string; }; latencyMs: { type: string; }; name: { type: string; }; status: { anyOf: { const: string; type: string; }[]; }; summary: { type: string; }; }; required: string[]; type: string; }; type: string; }; service: { properties: { contractDigest: { type: string; }; contractId: { type: string; }; info: { patternProperties: { ^.*$; }; type: string; }; instanceId: { type: string; }; kind: { anyOf: { const: string; type: string; }[]; }; name: { type: string; }; publishIntervalMs: { minimum: number; type: string; }; runtime: { anyOf: { const: string; type: string; }[]; }; runtimeVersion: { type: string; }; startedAt: { format: string; type: string; }; version: { type: string; }; }; required: string[]; type: string; }; status: { anyOf: { const: string; type: string; }[]; }; summary: { type: string; }; }
- required: string[]
- type: string
- Jobs.Cancel: { input: JobsCancelInput; output: JobsCancelOutput; }
- Jobs.DismissDLQ: { input: JobsDismissDLQInput; output: JobsDismissDLQOutput; }
- Jobs.Get: { input: JobsGetInput; output: JobsGetOutput; }
- Jobs.GetKey: { input: JobsGetKeyInput; output: JobsGetKeyOutput; }
- Jobs.Health: { input: JobsHealthInput; output: JobsHealthOutput; }
- Jobs.List: { input: JobsListInput; output: JobsListOutput; }
- Jobs.ListDLQ: { input: JobsListDLQInput; output: JobsListDLQOutput; }
- Jobs.ListServices: { input: JobsListServicesInput; output: JobsListServicesOutput; }
- Jobs.ReplayDLQ: { input: JobsReplayDLQInput; output: JobsReplayDLQOutput; }
- Jobs.Retry: { input: JobsRetryInput; output: JobsRetryOutput; }
- feed: { }
- operation: { }
-
rpc: { readonly jobs: { cancel(handler: RpcHandler<Types.JobsCancelInput, Types.JobsCancelOutput, TDeps>): Promise<void>; dismissDLQ(handler: RpcHandler<>): Promise<void>; get(handler: RpcHandler<Types.JobsGetInput, Types.JobsGetOutput, TDeps>): Promise<void>; getKey(handler: RpcHandler<Types.JobsGetKeyInput, Types.JobsGetKeyOutput, TDeps>): Promise<void>; health(handler: RpcHandler<Types.JobsHealthInput, Types.JobsHealthOutput, TDeps>): Promise<void>; list(handler: RpcHandler<Types.JobsListInput, Types.JobsListOutput, TDeps>): Promise<void>; listDLQ(handler: RpcHandler<Types.JobsListDLQInput, Types.JobsListDLQOutput, TDeps>): Promise<void>; listServices(handler: RpcHandler<Types.JobsDismissDLQInput,Types.JobsDismissDLQOutput,TDeps>): Promise<void>; replayDLQ(handler: RpcHandler<Types.JobsReplayDLQInput, Types.JobsReplayDLQOutput, TDeps>): Promise<void>; retry(handler: RpcHandler<Types.JobsRetryInput, Types.JobsRetryOutput, TDeps>): Promise<void>; }; }Types.JobsListServicesInput,Types.JobsListServicesOutput,TDeps
- api: Api
- connection: TrellisConnection
-
event: { readonly health: { heartbeat: { publish(event: HealthSdk.HealthHeartbeatEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: HealthSdk.HealthHeartbeatEvent): Result<>; listen(PreparedTrellisEvent<HealthSdk.HealthHeartbeatEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; }; }handler: EventCallback<HealthSdk.HealthHeartbeatEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts
- feed: { }
- name: string
- operation: { }
-
rpc: { readonly auth: { requestsValidate(): AsyncResult<AuthSdk.AuthRequestsValidateOutput, BaseError>; }; readonly jobs: { cancel(input: AuthSdk.AuthRequestsValidateInput,opts?: RequestOpts): AsyncResult<Types.JobsCancelOutput, BaseError>; dismissDLQ(input: Types.JobsCancelInput,opts?: RequestOpts): AsyncResult<Types.JobsDismissDLQOutput, BaseError>; get(input: Types.JobsDismissDLQInput,opts?: RequestOpts): AsyncResult<Types.JobsGetOutput, BaseError>; getKey(input: Types.JobsGetInput,opts?: RequestOpts): AsyncResult<Types.JobsGetKeyOutput, BaseError>; health(input: Types.JobsGetKeyInput,opts?: RequestOpts): AsyncResult<Types.JobsHealthOutput, BaseError>; list(input: Types.JobsHealthInput,opts?: RequestOpts): AsyncResult<Types.JobsListOutput, BaseError>; listDLQ(input: Types.JobsListInput,opts?: RequestOpts): AsyncResult<Types.JobsListDLQOutput, BaseError>; listServices(input: Types.JobsListDLQInput,opts?: RequestOpts): AsyncResult<Types.JobsListServicesOutput, BaseError>; replayDLQ(input: Types.JobsListServicesInput,opts?: RequestOpts): AsyncResult<Types.JobsReplayDLQOutput, BaseError>; retry(input: Types.JobsReplayDLQInput,opts?: RequestOpts): AsyncResult<Types.JobsRetryOutput, BaseError>; }; readonly trellis: { catalog(input: Types.JobsRetryInput,opts?: RequestOpts): AsyncResult<CoreSdk.TrellisCatalogOutput, BaseError>; }; }input: CoreSdk.TrellisCatalogInput,opts?: RequestOpts
- state: TrellisJobsState
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
-
active: Array<>{ heartbeatAgeMs: number; heartbeatAt: string; instanceId: string; jobId: string; leaseExpiresAt: string; startedAt: string; }
- key: string
- keyHash: string
- latestPolicyReason: string
- queued: Array<{ createdAt: string; jobId: string; }>
- queuedDepth: number
- service: string
- staleTakeoverCount: number
- type: string
| "active"
| "retry"
| "completed"
| "failed"
| "cancelled"
| "expired"
| "dead"
| "dismissed"
- count: number
-
entries: Array<>{ completedAt?: string; concurrency?: { heartbeatAt?: string; key: string; keyHash: string; leaseExpiresAt?: string; staleTakeoverCount?: number; }; context: { requestId: string; traceId: string; traceparent: string; tracestate?: string; }; createdAt: string; deadline?: string; id: string; lastError?: string; logs?: Array<>; maxTries: number; payload: unknown; progress?: { current?: number; message?: string; step?: string; total?: number; }; queuePolicy?: { existingJobId?: string; outcome: string; reason?: string; replacedJobId?: string; }; result?: unknown; service: string; startedAt?: string; state:{ level: "info" | "warn" | "error"; message: string; timestamp: string; }"pending"; tries: number; type: string; updatedAt: string; }
| "active"
| "retry"
| "completed"
| "failed"
| "cancelled"
| "expired"
| "dead"
| "dismissed" - limit: number
- nextOffset: number
- offset: number
| "active"
| "retry"
| "completed"
| "failed"
| "cancelled"
| "expired"
| "dead"
| "dismissed"
- count: number
-
entries: Array<>{ completedAt?: string; concurrency?: { heartbeatAt?: string; key: string; keyHash: string; leaseExpiresAt?: string; staleTakeoverCount?: number; }; context: { requestId: string; traceId: string; traceparent: string; tracestate?: string; }; createdAt: string; deadline?: string; id: string; lastError?: string; logs?: Array<>; maxTries: number; payload: unknown; progress?: { current?: number; message?: string; step?: string; total?: number; }; queuePolicy?: { existingJobId?: string; outcome: string; reason?: string; replacedJobId?: string; }; result?: unknown; service: string; startedAt?: string; state:{ level: "info" | "warn" | "error"; message: string; timestamp: string; }"pending"; tries: number; type: string; updatedAt: string; }
| "active"
| "retry"
| "completed"
| "failed"
| "cancelled"
| "expired"
| "dead"
| "dismissed" - limit: number
- nextOffset: number
- offset: number
- properties: { job: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { job: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { active: { items: { properties: { heartbeatAgeMs: { minimum: number; type: string; }; heartbeatAt: { format: string; type: string; }; instanceId: { type: string; }; jobId: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; startedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; latestPolicyReason: { minLength: number; type: string; }; queued: { items: { properties: { createdAt: { format: string; type: string; }; jobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; queuedDepth: { minimum: number; type: string; }; service: { minLength: number; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; type: { minLength: number; type: string; }; }
- required: string[]
- type: string
- properties: { job: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { items: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { limit: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; service: { minLength: number; type: string; }; since: { format: string; type: string; }; state: { items: { anyOf: { const: string; type: string; }[]; }; type: string; }; type: { minLength: number; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { items: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { count: { minimum: number; type: string; }; entries: { items: { properties: { healthy: { type: string; }; name: { minLength: number; type: string; }; workers: { items: { properties: { concurrency: { minimum: number; type: string; }; instanceId: { minLength: number; type: string; }; jobType: { minLength: number; type: string; }; service: { minLength: number; type: string; }; timestamp: { format: string; type: string; }; version: { minLength: number; type: string; }; }; required: string[]; type: string; }; type: string; }; }; required: string[]; type: string; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
- required: string[]
- type: string
- properties: { job: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { job: { properties: { completedAt: { format: string; type: string; }; concurrency: { properties: { heartbeatAt: { format: string; type: string; }; key: { minLength: number; type: string; }; keyHash: { minLength: number; type: string; }; leaseExpiresAt: { format: string; type: string; }; staleTakeoverCount: { minimum: number; type: string; }; }; required: string[]; type: string; }; context: { properties: { requestId: { minLength: number; type: string; }; traceId: { pattern: string; type: string; }; traceparent: { pattern: string; type: string; }; tracestate: { minLength: number; type: string; }; }; required: string[]; type: string; }; createdAt: { format: string; type: string; }; deadline: { format: string; type: string; }; id: { minLength: number; type: string; }; lastError: { type: string; }; logs: { items: { properties: { level: { anyOf: { const: string; type: string; }[]; }; message: { type: string; }; timestamp: { format: string; type: string; }; }; required: string[]; type: string; }; type: string; }; maxTries: { minimum: number; type: string; }; payload; progress: { properties: { current: { minimum: number; type: string; }; message: { type: string; }; step: { type: string; }; total: { minimum: number; type: string; }; }; type: string; }; queuePolicy: { properties: { existingJobId: { minLength: number; type: string; }; outcome: { minLength: number; type: string; }; reason: { minLength: number; type: string; }; replacedJobId: { minLength: number; type: string; }; }; required: string[]; type: string; }; result; service: { minLength: number; type: string; }; startedAt: { format: string; type: string; }; state: { anyOf: { const: string; type: string; }[]; }; tries: { minimum: number; type: string; }; type: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; }; required: string[]; type: string; }; }
- required: string[]
- type: string
- properties: { context: { patternProperties: { ^.*$; }; type: string; }; id: { minLength: number; type: string; }; jobId: { minLength: number; type: string; }; message: { type: string; }; resource: { minLength: number; type: string; }; traceId: { type: string; }; type: { const: string; type: string; }; }
- required: string[]
- type: string
- events
- feeds
- operations
- rpc: { Jobs.Cancel: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; runtimeErrors: { type: string; schema; fromSerializable; }[]; }; Jobs.DismissDLQ: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; runtimeErrors: { type: string; schema; fromSerializable; }[]; }; Jobs.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; runtimeErrors: { type: string; schema; fromSerializable; }[]; }; Jobs.GetKey: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; runtimeErrors: { type: string; schema; fromSerializable; }[]; }; Jobs.Health: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError"[]; declaredErrorTypes: "UnexpectedError"[]; }; Jobs.List: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; Jobs.ListDLQ: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; Jobs.ListServices: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError"[]; }; Jobs.ReplayDLQ: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; runtimeErrors: { type: string; schema; fromSerializable; }[]; }; Jobs.Retry: { subject: string; input; output; callerCapabilities: string[]; errors: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; declaredErrorTypes: "UnexpectedError" | "ValidationError" | "NotFoundError"[]; runtimeErrors: { type: string; schema; fromSerializable; }[]; }; }
- subjects
- State.Admin.Delete: { input: StateAdminDeleteInput; output: StateAdminDeleteOutput; }
- State.Admin.Get: { input: StateAdminGetInput; output: StateAdminGetOutput; }
- State.Admin.List: { input: StateAdminListInput; output: StateAdminListOutput; }
- State.Delete: { input: StateDeleteInput; output: StateDeleteOutput; }
- State.Get: { input: StateGetInput; output: StateGetOutput; }
- State.List: { input: StateListInput; output: StateListOutput; }
- State.Put: { input: StatePutInput; output: StatePutOutput; }
- feed: { }
- operation: { }
-
rpc: { readonly state: { adminDelete(handler: RpcHandler<>): Promise<void>; adminGet(handler: RpcHandler<Types.StateAdminGetInput, Types.StateAdminGetOutput, TDeps>): Promise<void>; adminList(handler: RpcHandler<Types.StateAdminDeleteInput,Types.StateAdminDeleteOutput,TDeps>): Promise<void>; delete(handler: RpcHandler<Types.StateDeleteInput, Types.StateDeleteOutput, TDeps>): Promise<void>; get(handler: RpcHandler<Types.StateGetInput, Types.StateGetOutput, TDeps>): Promise<void>; list(handler: RpcHandler<Types.StateListInput, Types.StateListOutput, TDeps>): Promise<void>; put(handler: RpcHandler<Types.StatePutInput, Types.StatePutOutput, TDeps>): Promise<void>; }; }Types.StateAdminListInput,Types.StateAdminListOutput,TDeps
- api: Api
- connection: TrellisConnection
-
event: { readonly health: { heartbeat: { publish(event: HealthSdk.HealthHeartbeatEvent): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: HealthSdk.HealthHeartbeatEvent): Result<>; listen(PreparedTrellisEvent<HealthSdk.HealthHeartbeatEvent>,ValidationError | UnexpectedError): AsyncResult<void, ValidationError | UnexpectedError>; }; }; }handler: EventCallback<HealthSdk.HealthHeartbeatEvent>,subjectData?: Record<string, unknown>,opts?: EventOpts
- feed: { }
- name: string
- operation: { }
-
rpc: { readonly state: { adminDelete(): AsyncResult<Types.StateAdminDeleteOutput, BaseError>; adminGet(input: Types.StateAdminDeleteInput,opts?: RequestOpts): AsyncResult<Types.StateAdminGetOutput, BaseError>; adminList(input: Types.StateAdminGetInput,opts?: RequestOpts): AsyncResult<Types.StateAdminListOutput, BaseError>; delete(input: Types.StateAdminListInput,opts?: RequestOpts): AsyncResult<Types.StateDeleteOutput, BaseError>; get(input: Types.StateDeleteInput,opts?: RequestOpts): AsyncResult<Types.StateGetOutput, BaseError>; list(input: Types.StateGetInput,opts?: RequestOpts): AsyncResult<Types.StateListOutput, BaseError>; put(input: Types.StateListInput,opts?: RequestOpts): AsyncResult<Types.StatePutOutput, BaseError>; }; }input: Types.StatePutInput,opts?: RequestOpts
- state: TrellisStateState
- stream: string
- timeout: number
- transfer(grant: SendTransferGrant): SendTransferHandle
- wait(): AsyncResult<void, BaseError>
| { currentStateVersion: string; entry: { expiresAt?: string; key?: string; revision: string; updatedAt: string; value: unknown; }; migrationRequired: true; stateVersion: string; writerContractDigest: string; }
- count: number
-
entries: Array<>({ expiresAt?: string; key?: string; revision: string; updatedAt: string; value: unknown; })
| { currentStateVersion: string; entry: { expiresAt?: string; key?: string; revision: string; updatedAt: string; value: unknown; }; migrationRequired: true; stateVersion: string; writerContractDigest: string; } - limit: number
- nextOffset: number
- offset: number
| { currentStateVersion: string; entry: { expiresAt?: string; key?: string; revision: string; updatedAt: string; value: unknown; }; migrationRequired: true; stateVersion: string; writerContractDigest: string; }
- count: number
-
entries: Array<>({ expiresAt?: string; key?: string; revision: string; updatedAt: string; value: unknown; })
| { currentStateVersion: string; entry: { expiresAt?: string; key?: string; revision: string; updatedAt: string; value: unknown; }; migrationRequired: true; stateVersion: string; writerContractDigest: string; } - limit: number
- nextOffset: number
- offset: number
- events
- feeds
- operations
- rpc: { State.Admin.Delete: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; State.Admin.Get: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; State.Admin.List: { subject: string; input; output; callerCapabilities: string[]; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; State.Delete: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; State.Get: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; State.List: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; State.Put: { subject: string; input; output; callerCapabilities; errors: "AuthError" | "UnexpectedError" | "ValidationError"[]; declaredErrorTypes: "AuthError" | "UnexpectedError" | "ValidationError"[]; }; }
- subjects
| { properties: { currentStateVersion: { minLength: number; type: string; }; entry: { properties: { expiresAt: { format: string; type: string; }; key: { minLength: number; type: string; }; revision: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; value; }; required: string[]; type: string; }; migrationRequired: { const: boolean; type: string; }; stateVersion: { minLength: number; type: string; }; writerContractDigest: { minLength: number; type: string; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { anyOf: { properties: { expiresAt: { format: string; type: string; }; key: { minLength: number; type: string; }; revision: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; value; }; required: string[]; type: string; }[]; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { currentStateVersion: { minLength: number; type: string; }; entry: { properties: { expiresAt: { format: string; type: string; }; key: { minLength: number; type: string; }; revision: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; value; }; required: string[]; type: string; }; migrationRequired: { const: boolean; type: string; }; stateVersion: { minLength: number; type: string; }; writerContractDigest: { minLength: number; type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
| { properties: { currentStateVersion: { minLength: number; type: string; }; entry: { properties: { expiresAt: { format: string; type: string; }; key: { minLength: number; type: string; }; revision: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; value; }; required: string[]; type: string; }; migrationRequired: { const: boolean; type: string; }; stateVersion: { minLength: number; type: string; }; writerContractDigest: { minLength: number; type: string; }; }; required: string[]; type: string; }
-
properties: { count: { minimum: number; type: string; }; entries: { default; items: { anyOf: { properties: { expiresAt: { format: string; type: string; }; key: { minLength: number; type: string; }; revision: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; value; }; required: string[]; type: string; }[]; }; type: string; }; limit: { minimum: number; type: string; }; nextOffset: { minimum: number; type: string; }; offset: { minimum: number; type: string; }; }
| { properties: { currentStateVersion: { minLength: number; type: string; }; entry: { properties: { expiresAt: { format: string; type: string; }; key: { minLength: number; type: string; }; revision: { minLength: number; type: string; }; updatedAt: { format: string; type: string; }; value; }; required: string[]; type: string; }; migrationRequired: { const: boolean; type: string; }; stateVersion: { minLength: number; type: string; }; writerContractDigest: { minLength: number; type: string; }; }; required: string[]; type: string; } - required: string[]
- type: string
Trellis service authoring entry point.
In-memory inbox repository intended for duplicate-suppression tests.
In-memory outbox repository intended for tests and local process adapters.
-
claimDue(): Promise<OutboxMessage[]>limit: number,now: Date
- enqueue(event: PreparedTrellisEvent): Promise<OutboxMessage>
-
markDispatched(): Promise<void>id: string,now: Date
-
markFailed(): Promise<void>id: string,failure: { error: string; nextAttemptAt: Date; now: Date; }
- snapshot(): readonly OutboxMessage[]
Durable NATS KV inbox repository for event-id duplicate suppression.
Durable NATS KV outbox repository for services without SQL state.
Coalesces outbox wakeups and drains due messages through dispatchOutbox.
-
notify(): void
Signals that outbox work may be available and schedules a drain soon.
-
stop(): void
Cancels pending wakeups and prevents future dispatch work.
-
add(): () => voidname: string,check: ServiceHealthCheckFn
- checks(): Promise<HealthCheckResult[]>
- contractDigest: string
- contractId: string
- heartbeat(): Promise<HealthHeartbeat>
- instanceId: string
- kind: HealthHeartbeat["service"]["kind"]
- publishIntervalMs: number
- response(): Promise<HealthResponse>
- serviceName: string
- setInfo(info: ServiceHealthInfo | ServiceHealthInfoFn): void
- startedAt: string
SQL-backed inbox repository over a caller-owned executor.
SQL-backed outbox repository over a caller-owned executor.
- binding: ResourceBindingStore
- open(): AsyncResult<TypedStore, StoreError>
-
waitFor(): AsyncResult<TypedStoreEntry, StoreError>key: string,options?: StoreWaitOptions
Waits for a staged object to appear in the bound store and returns its entry.
- auth: SessionAuth
-
completeOperation(): AsyncResult<unknown, BaseError>operationId: string,output: unknown
Completes an operation from Trellis-owned control-plane code that resolves an operation from a separate RPC handler.
-
connect<>(args: TrellisServiceConnectArgs<TContract>): AsyncResult<TContract extends ServiceContract<>TrellisAPI,TrellisAPI | undefined,ContractJobsMetadata,ContractKvMetadata>TrellisService<>,ContractOwnedApi<TContract>,ContractTrellisApi<TContract>,ContractJobsOf<TContract>,ContractKvOf<TContract>TransportError | UnexpectedError
-
connection: TrellisConnection
Framework-neutral lifecycle handle for the service runtime connection.
-
createTransfer(args: { direction: "receive"; store: string; key: string; sessionKey: string; expiresInMs?: number; }): AsyncResult<ReceiveTransferGrant, TransferError>
Creates a short-lived receive transfer grant for a caller session.
-
event: ActiveEventFacade<TTrellisApi>
Event lifecycle surface for service startup listeners and publishers.
- handle: TypedServiceHandleFacade<TOwnedApi, TTrellisApi, TKv, TJobs>
- health: ServiceHealth
- jobs: JobsFacadeOf<TJobs, TTrellisApi, TKv>
- kv: ServiceKvFacade<TKv>
- name: string
-
publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
Publishes a prepared event through the service runtime connection.
- stop(): Promise<void>
- store: Record<string, StoreHandle>
- wait(): Promise<void>
-
with<TDeps>(deps: TDeps): BoundTrellisService<TOwnedApi, TTrellisApi, TJobs, TKv, TDeps>
Returns a service wrapper that injects application dependencies into service-owned handler argument objects as
args.deps.
Creates an EventContext from a JetStream message.
Returns Postgres DDL for Trellis outbox and inbox tables.
Returns SQLite DDL for Trellis outbox and inbox tables.
Creates SQL outbox/inbox repositories plus DDL for caller-owned migrations.
Dispatches due outbox messages through a Trellis runtime publisher.
Type guard to check if a subscription is a GroupedSubscription.
Rehydrates a persisted outbox row into a prepared event.
Runs all health checks and returns an aggregated health response.
Runs a single health check and returns the result.
Context provided to event handlers with message metadata and acknowledgment controls.
-
ack: () => void
Acknowledge successful processing of the message
-
id: string
Unique identifier for this event
-
nak: (delay?: number) => void
Negative acknowledge - request redelivery, optionally after a delay in milliseconds
-
seq: number
JetStream sequence number for this message
-
term: () => void
Terminate processing - indicate the message should not be redelivered
-
time: Date
Timestamp when the event was created
Handler function for processing events.
& WithDeps<TDeps>
Typed feed handler function for an extracted Trellis service handler.
A subscription that handles multiple events as a group with shared ordering semantics.
-
group: OrderingGroup<TA>
The ordering group configuration
-
handlers: Partial<Record<Events<TA>, EventHandler<TA, Events<TA>>>>
Partial map of event types to their handlers
A health check function that returns a Result indicating health status.
Typed health check function for an extracted bound service health handler.
Result of a single health check.
-
error: string
Error message if the check failed with an error
-
info: Record<string, JsonValue>
Optional structured metadata for the check
-
latencyMs: number
Time in milliseconds the check took to execute
-
name: string
Name of the health check
-
status: "ok" | "failed"
Status of the check: "ok" if passed, "failed" if not
-
summary: string
Optional short human-readable summary
- checks: HealthCheckResult[]
- service: { name: string; kind: "service" | "device"; instanceId: string; contractId: string; contractDigest: string; startedAt: string; publishIntervalMs: number; runtime: "deno" | "node" | "rust" | "unknown"; runtimeVersion?: string; version?: string; info?: Record<string, JsonValue>; }
- status: HealthResponse["status"]
- summary: string
| undefined
| Promise<ServiceHealthInfo | undefined>
Typed health info function for an extracted bound service health handler.
Aggregated health response for a service.
-
checks: HealthCheckResult[]
Individual health check results
-
service: string
Name of the service
-
status: "healthy" | "unhealthy" | "degraded"
Overall status: "healthy" if all pass, "unhealthy" if all fail, "degraded" if mixed
-
timestamp: string
ISO timestamp of when the health check was performed
& WithDeps<TDeps>
Arguments passed to a typed Trellis service job handler.
Typed job handler function for an extracted Trellis service job handler.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (args: { job: PublicActiveJob<TPayload, TResult>; client: Trellis<TTrellisApi, TKv, TJobs>; }) => Promise<Result<TResult, BaseError>>): void
- submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Result returned by a typed Trellis service job handler.
Union type representing either a grouped or single subscription.
Options for subscribing to multiple events.
-
defaultMode: "strict" | "independent"
Default processing mode when not specified in a subscription
& { client: Trellis<
& WithDeps<TDeps>
Typed operation handler function for an extracted Trellis service handler.
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
-
accept(args: { sessionKey: string; }): AsyncResult<>AcceptedOperation<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>UnexpectedError
-
control(operationId: string): AsyncResult<>OperationRuntimeHandle<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>BaseError
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
-
handle(handler: (args: OperationHandlerContext<) => unknown | Promise<unknown>): Promise<void>>InferSchemaType<TOwnedApi["operations"][O]["input"]>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>,OperationTransferContextOf<TOwnedApi, O>
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
Defines a group of events that should be processed together with ordering guarantees.
-
events: Array<Events<TA>>
List of event types that belong to this group
-
mode: "strict" | "independent"
Processing mode: "strict" maintains order, "independent" allows parallel processing
-
name: string
Unique name for this ordering group
Options for OutboxDispatcher.
-
debounceMs: number
Delay used to debounce
notify()calls before starting a drain. -
idleRetryMs: number
Optional low-frequency wakeup for missed signals or process restarts.
-
limit: number
Maximum number of messages claimed by each
dispatchOutboxbatch. -
onError: (error: unknown) => void
Receives repository or publish errors raised by background dispatch.
-
retryDelayMs: number
Delay before failed messages become eligible; values below 1ms become 1ms.
& WithDeps<TDeps>
Typed event listener function for an extracted Trellis service listener.
A subscription for a single event type.
-
event: E
The event type to subscribe to
-
handler: EventHandler<TA, E>
Handler function for processing events of this type
-
opts: SubscribeOpts
Optional subscription configuration
Options for subscribing to events.
- consumerName: string
-
filter: Record<string, string>
Filter events by template variables (e.g., { origin: "github", id: "user-123" })
-
startSeq: number
Start consuming from a specific sequence number
-
startTime: Date
Start consuming from a specific time
- contract: ServiceContract<TOwnedApi, TTrellisApi>
- name: string
- server: TrellisServiceServerOpts
- sessionKeySeed: string
-
telemetry: TrellisServiceConnectTelemetryOpts
Controls automatic telemetry initialization for this service connection. Enabled by default; pass
falseor{ enabled: false }to disable it. - trellisUrl: string
Controls automatic telemetry initialization for TrellisService.connect().
Converts a Trellis SQL statement with positional placeholders into a Drizzle
SQL object with parameters bound in order.
Adapts a caller-owned Drizzle SQLite database or transaction to Trellis'
generic SqlExecutor interface.
Structural Drizzle SQLite database or transaction shape accepted by Trellis SQL outbox helpers.
-
all(query: SQL): Promise<readonly SqlRow[]>
Runs a SQL statement that returns rows.
-
run(query: SQL): Promise<unknown>
Runs a SQL statement that does not return rows.
- auth: SessionAuth
-
completeOperation(): AsyncResult<unknown, BaseError>operationId: string,output: unknown
Completes an operation from Trellis-owned control-plane code that resolves an operation from a separate RPC handler.
-
connect<>(args: TrellisServiceConnectArgs<TContract>): AsyncResult<TContract extends ServiceContract<>TrellisAPI,TrellisAPI | undefined,ContractJobsMetadata,ContractKvMetadata>TrellisService<>,ContractOwnedApi<TContract>,ContractTrellisApi<TContract>,ContractJobsOf<TContract>,ContractKvOf<TContract>TransportError | UnexpectedError
-
connection: TrellisConnection
Framework-neutral lifecycle handle for the service runtime connection.
-
createTransfer(args: { direction: "receive"; store: string; key: string; sessionKey: string; expiresInMs?: number; }): AsyncResult<ReceiveTransferGrant, TransferError>
Creates a short-lived receive transfer grant for a caller session.
-
event: ActiveEventFacade<TTrellisApi>
Event lifecycle surface for service startup listeners and publishers.
- handle: TypedServiceHandleFacade<TOwnedApi, TTrellisApi, TKv, TJobs>
- health: ServiceHealth
- jobs: JobsFacadeOf<TJobs, TTrellisApi, TKv>
- kv: ServiceKvFacade<TKv>
- name: string
-
publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
Publishes a prepared event through the service runtime connection.
- stop(): Promise<void>
- store: Record<string, StoreHandle>
- wait(): Promise<void>
-
with<TDeps>(deps: TDeps): BoundTrellisService<TOwnedApi, TTrellisApi, TJobs, TKv, TDeps>
Returns a service wrapper that injects application dependencies into service-owned handler argument objects as
args.deps.
& WithDeps<TDeps>
Typed feed handler function for an extracted Trellis service handler.
Typed health check function for an extracted bound service health handler.
| undefined
| Promise<ServiceHealthInfo | undefined>
Typed health info function for an extracted bound service health handler.
& WithDeps<TDeps>
Arguments passed to a typed Trellis service job handler.
Typed job handler function for an extracted Trellis service job handler.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (args: { job: PublicActiveJob<TPayload, TResult>; client: Trellis<TTrellisApi, TKv, TJobs>; }) => Promise<Result<TResult, BaseError>>): void
- submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Result returned by a typed Trellis service job handler.
& { client: Trellis<
& WithDeps<TDeps>
Typed operation handler function for an extracted Trellis service handler.
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
-
accept(args: { sessionKey: string; }): AsyncResult<>AcceptedOperation<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>UnexpectedError
-
control(operationId: string): AsyncResult<>OperationRuntimeHandle<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>BaseError
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
-
handle(handler: (args: OperationHandlerContext<) => unknown | Promise<unknown>): Promise<void>>InferSchemaType<TOwnedApi["operations"][O]["input"]>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>,OperationTransferContextOf<TOwnedApi, O>
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
& WithDeps<TDeps>
Typed event listener function for an extracted Trellis service listener.
- contract: ServiceContract<TOwnedApi, TTrellisApi>
- name: string
- server: TrellisServiceServerOpts
- sessionKeySeed: string
-
telemetry: TrellisServiceConnectTelemetryOpts
Controls automatic telemetry initialization for this service connection. Enabled by default; pass
falseor{ enabled: false }to disable it. - trellisUrl: string
Controls automatic telemetry initialization for TrellisService.connect().
- auth: SessionAuth
-
completeOperation(): AsyncResult<unknown, BaseError>operationId: string,output: unknown
Completes an operation from Trellis-owned control-plane code that resolves an operation from a separate RPC handler.
-
connect<>(args: TrellisServiceConnectArgs<TContract>): AsyncResult<TContract extends ServiceContract<>TrellisAPI,TrellisAPI | undefined,ContractJobsMetadata,ContractKvMetadata>TrellisService<>,ContractOwnedApi<TContract>,ContractTrellisApi<TContract>,ContractJobsOf<TContract>,ContractKvOf<TContract>TransportError | UnexpectedError
-
connection: TrellisConnection
Framework-neutral lifecycle handle for the service runtime connection.
-
createTransfer(args: { direction: "receive"; store: string; key: string; sessionKey: string; expiresInMs?: number; }): AsyncResult<ReceiveTransferGrant, TransferError>
Creates a short-lived receive transfer grant for a caller session.
-
event: ActiveEventFacade<TTrellisApi>
Event lifecycle surface for service startup listeners and publishers.
- handle: TypedServiceHandleFacade<TOwnedApi, TTrellisApi, TKv, TJobs>
- health: ServiceHealth
- jobs: JobsFacadeOf<TJobs, TTrellisApi, TKv>
- kv: ServiceKvFacade<TKv>
- name: string
-
publishPrepared(event: PreparedTrellisEvent): AsyncResult<void, UnexpectedError>
Publishes a prepared event through the service runtime connection.
- stop(): Promise<void>
- store: Record<string, StoreHandle>
- wait(): Promise<void>
-
with<TDeps>(deps: TDeps): BoundTrellisService<TOwnedApi, TTrellisApi, TJobs, TKv, TDeps>
Returns a service wrapper that injects application dependencies into service-owned handler argument objects as
args.deps.
& WithDeps<TDeps>
Typed feed handler function for an extracted Trellis service handler.
Typed health check function for an extracted bound service health handler.
| undefined
| Promise<ServiceHealthInfo | undefined>
Typed health info function for an extracted bound service health handler.
& WithDeps<TDeps>
Arguments passed to a typed Trellis service job handler.
Typed job handler function for an extracted Trellis service job handler.
- create(payload: TPayload): AsyncResult<JobRef<TPayload, TResult>, BaseError>
- handle(handler: (args: { job: PublicActiveJob<TPayload, TResult>; client: Trellis<TTrellisApi, TKv, TJobs>; }) => Promise<Result<TResult, BaseError>>): void
- submit(payload: TPayload): AsyncResult<JobSubmitOutcome<TPayload, TResult>, BaseError>
Result returned by a typed Trellis service job handler.
& { client: Trellis<
& WithDeps<TDeps>
Typed operation handler function for an extracted Trellis service handler.
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
-
accept(args: { sessionKey: string; }): AsyncResult<>AcceptedOperation<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>UnexpectedError
-
control(operationId: string): AsyncResult<>OperationRuntimeHandle<>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>BaseError
Loads an existing operation by id and returns a service-side control handle. The operation must belong to this service and registration name.
-
handle(handler: (args: OperationHandlerContext<) => unknown | Promise<unknown>): Promise<void>>InferSchemaType<TOwnedApi["operations"][O]["input"]>,OperationProgressOf<TOwnedApi, O>,OperationOutputOf<TOwnedApi, O>,OperationTransferContextOf<TOwnedApi, O>
& { client: Trellis<TTrellisApi, TKv, TJobs>; }
& WithDeps<TDeps>
Typed event listener function for an extracted Trellis service listener.
- contract: ServiceContract<TOwnedApi, TTrellisApi>
- name: string
- server: TrellisServiceServerOpts
- sessionKeySeed: string
-
telemetry: TrellisServiceConnectTelemetryOpts
Controls automatic telemetry initialization for this service connection. Enabled by default; pass
falseor{ enabled: false }to disable it. - trellisUrl: string
Controls automatic telemetry initialization for TrellisService.connect().
An enumeration of status codes.
Returns the shared Trellis OpenTelemetry meter.
Initializes Trellis telemetry for a service runtime.
Records one Trellis error with only stable, low-cardinality attributes.
-
deleteValue(key: symbol): Context
Return a new context which inherits from this context but does not contain a value for the given key.
-
getValue(key: symbol): unknown
Get a value from the context.
-
setValue(): Contextkey: symbol,value: unknown
Create a new context which inherits from this context and has the given key set to the given value.
An interface that represents a span. A span represents a single operation within a trace. Examples of span might include remote procedure calls or a in-process function calls to sub-components. A Trace has a single, top-level "root" Span that in turn may have zero or more child Spans, which in turn may have children.
-
addEvent(): thisname: string,attributesOrStartTime?: SpanAttributes | TimeInput,startTime?: TimeInput
Adds an event to the Span.
-
addLink(link: Link): this
Adds a single link to the span.
-
addLinks(links: Link[]): this
Adds multiple links to the span.
-
end(endTime?: TimeInput): void
Marks the end of Span execution.
-
isRecording(): boolean
Returns the flag whether this span will be recorded.
-
recordException(): voidexception: Exception,time?: TimeInput
Sets exception as a span event
-
setAttribute(): thiskey: string,value: SpanAttributeValue
Sets an attribute to the span.
-
setAttributes(attributes: SpanAttributes): this
Sets attributes to the span.
-
setStatus(status: SpanStatus): this
Sets the status of the span.
-
spanContext(): SpanContext
Returns the SpanContext object associated with this Span.
-
updateName(name: string): this
Updates the Span name.
Low-cardinality attributes accepted by recordTrellisError.
-
authReason: string
Stable auth failure reason, such as
missing_session_key. -
direction: string
Stable flow direction such as
client,server,publish, orconsume. -
errorType: string
Stable local Trellis error type override when the thrown value does not expose one.
-
messagingOperation: string
Static messaging operation name, when already known.
-
messagingSystem: string
Static messaging system name, when already known.
-
operation: string
Stable operation kind or method name. Do not pass IDs, subjects, or URLs.
-
phase: string
Stable lifecycle phase such as
encode,send,auth, orhandler. -
remoteErrorType: string
Stable wrapped remote Trellis error type override.
-
surface: string
Stable Trellis surface name, such as
rpc,jobs, oroperations.
Entrypoint for context API
Entrypoint for trace API
& { reason: AuthErrorData["reason"]; message?: string; context?: Record<string, unknown>; id?: string; }
Error for authentication and authorization failures.
- name: "AuthError"
- reason: AuthErrorData["reason"]
-
toSerializable(): AuthErrorData
Serializes error to a plain object.
& { operation?: string; context?: Record<string, unknown>; id?: string; }
Error for KV storage operations. Used when key-value store operations fail.
- name: "KVError"
- operation: string
-
toSerializable(): KVErrorData
Serializes error to a plain object.
& { operationId: string; state?: string; operation?: string; service?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a Trellis operation lifecycle mutation targets a terminal operation.
- name: "OperationAlreadyTerminalError"
- operation: string
- operationId: string
- service: string
- state: string
-
toSerializable(): OperationAlreadyTerminalErrorData
Serializes error to a plain object.
& { operationId: string; expectedService: string; expectedOperation: string; actualService?: string; actualOperation?: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a Trellis operation id belongs to a different service or operation.
& { operationId: string; message?: string; context?: Record<string, unknown>; id?: string; traceId?: string; }
Error raised when a requested Trellis operation id cannot be found.
- name: "OperationNotFoundError"
- operationId: string
-
toSerializable(): OperationNotFoundErrorData
Serializes error to a plain object.
& { error: TransportableTrellisErrorData; context?: Record<string, unknown>; id?: string; }
Error for wrapping errors received from remote Trellis services. This is the only error type with parseJSON/parseObject methods for deserializing remote errors.
- name: "RemoteError"
-
parse(data: unknown): Result<>TransportableTrellisErrorData,ValidationError | UnexpectedError
Parses and validates a plain object as TrellisErrorData. Use this to deserialize errors received from remote services.
-
parseJSON
Alias for parse() - parses JSON string or object as TrellisErrorData.
- remoteError: TransportableTrellisErrorData
-
toSerializable(): RemoteErrorData
Serializes error to a plain object.
Abstract base class for Trellis errors. Trellis errors automatically include traceId when initTelemetry() has been called and a span is active in the current context.
Represents an unexpected error. Use this for wrapping unknown errors or for truly unexpected conditions.
- name: "UnexpectedError"
-
toSerializable(): UnexpectedErrorData
Serializes error to a plain object.
& { errors: Iterable<ValidationErrorInput>; context?: Record<string, unknown>; id?: string; }
Error for data validation failures. Includes schema validation and missing required data.
- name: "ValidationError"
-
toSerializable(): ValidationErrorData
Serializes error to a plain object. Transforms internal errors array to issues array for serialization.
Compile-time mapping from error names to their instance types. Derived from TRELLIS_ERRORS to ensure types stay in sync with runtime.
- AuthError: { type: string; schema; fromSerializable(data: AuthErrorData); }
- KVError: { type: string; schema; fromSerializable(data: KVErrorData); }
- OperationAlreadyTerminalError: { type: string; schema; fromSerializable(data: OperationAlreadyTerminalErrorData); }
- OperationMismatchError: { type: string; schema; fromSerializable(data: OperationMismatchErrorData); }
- OperationNotFoundError: { type: string; schema; fromSerializable(data: OperationNotFoundErrorData); }
- StoreError: { type: string; schema; fromSerializable(data: StoreErrorData); }
- TransferError: { type: string; schema; fromSerializable(data: TransferErrorData); }
- TransportError: { type: string; schema; fromSerializable(data: TransportErrorData); }
- UnexpectedError: { type: string; schema; fromSerializable(data: UnexpectedErrorData); }
- ValidationError: { type: string; schema; fromSerializable(data: ValidationErrorData); }
Schema for ValidationError serialization.
Schema for validation issue in ValidationError.