Creates an instance of CloudAdapter.
OptionalauthConfig: AuthConfigurationThe authentication configuration for securing communications
OptionalauthProvider: AuthProviderNo longer used
OptionaluserTokenClient: UserTokenClientClient for connecting to the Azure Bot Service
ReadonlyConnectorSymbol key used to store connector client instances in the TurnContext.
ProtectedmiddlewareThe middleware set used to process the pipeline of middleware handlers.
ReadonlyUserSymbol key used to store User Token Client instances in the TurnContext.
Gets the error handler for the adapter.
The current error handler function.
Sets the error handler for the adapter.
The error handler function to set.
Continues a conversation.
The conversation reference to continue.
The logic to execute.
A promise representing the completion of the continue operation.
ProtectedcreateProtectedCreates a connector client for a specific service URL and scope.
The URL of the service to connect to
The authentication scope to use
Optionalheaders: HeaderPropagationCollectionOptional headers to propagate in the request
A promise that resolves to a ConnectorClient instance
ProtectedcreateOptionalheaders: HeaderPropagationCollectionCreates a conversation.
The agent application ID.
The channel ID.
The service URL.
The audience.
The conversation parameters.
The logic to execute.
A promise representing the completion of the create operation.
ProtectedcreateCreates an activity to represent the result of creating a conversation.
The ID of the created conversation.
The channel ID.
The service URL.
The conversation parameters.
The created activity.
The activity to process.
The logic to execute.
Optionalidentity: JwtPayloadThe created TurnContext.
ProtectedcreateProtectedCreates a user token client for a specific service URL and scope.
The authentication scope to use
Optionalheaders: HeaderPropagationCollectionOptional headers to propagate in the request
A promise that resolves to a ConnectorClient instance
Deletes an activity.
The TurnContext for the current turn.
The conversation reference of the activity to delete.
A promise representing the completion of the delete operation.
The attachment ID.
The view ID.
A promise representing the NodeJS.ReadableStream for the requested attachment.
The attachment ID.
A promise representing the AttachmentInfo for the requested attachment.
Processes an incoming request and sends the response.
The incoming request.
The response to send.
The logic to execute.
OptionalheaderPropagation: HeaderPropagationDefinitionOptional function to handle header propagation.
ProtectedprocessProcesses the turn results and returns an InvokeResponse if applicable.
The TurnContext for the current turn.
The InvokeResponse if applicable, otherwise undefined.
ProtectedresolveProtectedDetermines whether a connector client is needed based on the delivery mode and service URL of the given activity.
The activity to evaluate.
true if a ConnectorClient is needed, false otherwise. A connector client is required if the activity's delivery mode is not "ExpectReplies" and the service URL is not null or empty.
ProtectedrunRuns the middleware pipeline in sequence.
The TurnContext for the current turn.
The next function to call in the pipeline.
A promise representing the completion of the middleware pipeline.
Sends multiple activities to the conversation.
The TurnContext for the current turn.
The activities to send.
A promise representing the array of ResourceResponses for the sent activities.
ProtectedsetProtectedSets the connector client on the turn context.
The current turn context
OptionalconnectorClient: ConnectorClientProtectedsetProtectedSets the user token client on the turn context.
The current turn context
OptionaluserTokenClient: UserTokenClientUpdates an activity.
The TurnContext for the current turn.
The activity to update.
A promise representing the ResourceResponse for the updated activity.
The conversation ID.
The attachment data.
A promise representing the ResourceResponse for the uploaded attachment.
Adds middleware to the adapter's middleware pipeline.
The middleware to add.
The adapter instance.
Staticcreate
Adapter for handling agent interactions with various channels through cloud-based services.
Remarks
CloudAdapter processes incoming HTTP requests from Azure Bot Service channels, authenticates them, and generates outgoing responses. It manages the communication flow between agents and users across different channels, handling activities, attachments, and conversation continuations.