Payload class
The recipient-suggested continuation reserved at SPEC.md §8.6: the original task was understood, but cannot complete in isolation, and this names what the recipient party expects in order to proceed. A next step is neither a success response nor a failure. The originating task is left open — a consumer that means 'no' returns a trust-task-error instead, and one that means 'done' returns the originating specification's #response variant. This specification declares no response anchor: a producer answers a next step by issuing a document of the expected type, not by responding to this one.
Constructors
-
Payload({required List<
PayloadExpectsItem> expects, Object? continuation, PayloadInResponseTo? inResponseTo, String? message, Ext? ext}) -
const
-
Payload.fromJson(Map<
String, dynamic> json) -
Read this payload from a decoded JSON object.
factory
Properties
- continuation → Object?
-
What happens once an expected task completes.
resubmit(the default) means the expected task is a PREREQUISITE and the producer re-issues the originating request to continue — a new document with a fresh id and the same threadId, which SPEC §8.4 distinguishes from a retry, since a retry is bit-for-bit identical and is not what happens here; this matches the established pattern of task-consent/granted, where the requester re-submits once approval lands.proceedmeans the expected task IS the continuation and the originating request is not re-issued, as in an offer answered by a request.final -
expects
→ List<
PayloadExpectsItem> -
The continuations the recipient will accept, in the producer's order of preference
where the recipient has one. More than one entry means ALTERNATIVES — satisfying
any single entry unblocks the exchange, never all of them. A recipient that needs
several things done first names the one it wants next and issues a further next
step afterwards; expressing a conjunction here would be a flow definition, which
belongs to a ceremony rather than to a single response.
final
-
ext
→ Map<
String, dynamic> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inResponseTo → PayloadInResponseTo?
-
Identifies the Trust Task document this next step answers. SHOULD be populated, for
the reason SPEC §8.2 gives for the identical member on an error response: threadId
correlates the exchange only for a party that already saw the request, so a
retained next step otherwise names neither the task it interrupted nor the
instance.
final
- message → String?
-
Human-readable description of why the task cannot complete in isolation.
Non-normative. Subject to the same restraint as an error message: it reaches a
party that may not be entitled to learn why.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialize to a JSON-encodable map, omitting absent members.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited