ElicitRequest extension type

The parameters for an elicitation/create request.

on
Implemented types
Available extensions

Constructors

ElicitRequest({required String message, required ObjectSchema requestedSchema, MetaWithProgressToken? meta})
factory
ElicitRequest.url({required String message, required String url, required String elicitationId, MetaWithProgressToken? meta})
Creates a URL-mode elicitation request.
factory

Properties

elicitationId String?
A unique identifier for the elicitation.
no setter
message String
A message to display to the user when collecting the response.
no setter
meta MetaWithProgressToken?
If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress).
no setterinherited
mode ElicitationMode
The mode of this elicitation.
no setter
requestedSchema ObjectSchema?
A JSON schema that describes the expected response.
no setter
url String?
The URL that the user should navigate to.
no setter

Methods

onElicitationComplete(ServerConnection connection) Stream<void>

Available on ElicitRequest, provided by the ElicitationServerConnection extension

Broadcast stream of notifications for this elicitation ID. Events are not buffered so you must listen to this stream prior to opening the URL or you may miss the notification.

Static Methods

validateRequestedSchema(ObjectSchema schema) bool
Validates the schema to make sure that it conforms to the limitations of the spec.

Constants

form → const ElicitRequest Function({required String message, MetaWithProgressToken? meta, required ObjectSchema requestedSchema})
Creates a form-mode elicitation request.
methodName → const String