-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move InvokeResponse, WebRequest, WebResponse interfaces into separate…
… files
- Loading branch information
Showing
10 changed files
with
149 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @module botbuilder | ||
*/ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
export * from './invokeResponse'; | ||
export * from './webRequest'; | ||
export * from './webResponse'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @module botbuilder | ||
*/ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* Represents a response returned by a bot when it receives an `invoke` activity. | ||
* | ||
* This interface supports the framework and is not intended to be called directly for your code. | ||
*/ | ||
export interface InvokeResponse { | ||
/** | ||
* The HTTP status code of the response. | ||
*/ | ||
status: number; | ||
|
||
/** | ||
* Optional. The body of the response. | ||
*/ | ||
body?: any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @module botbuilder | ||
*/ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* Represents an Express or Restify request object. | ||
* | ||
* This interface supports the framework and is not intended to be called directly for your code. | ||
*/ | ||
export interface WebRequest { | ||
/** | ||
* Optional. The request body. | ||
*/ | ||
body?: any; | ||
|
||
/*** | ||
* Optional. The request headers. | ||
*/ | ||
headers: any; | ||
|
||
/*** | ||
* Optional. The request method. | ||
*/ | ||
method?: any; | ||
|
||
/*** | ||
* Optional. The request parameters from the url. | ||
*/ | ||
params?: any; | ||
|
||
/*** | ||
* Optional. The values from the query string. | ||
*/ | ||
query?: any; | ||
|
||
/** | ||
* When implemented in a derived class, adds a listener for an event. | ||
* The framework uses this method to retrieve the request body when the | ||
* [body](xref:botbuilder.WebRequest.body) property is `null` or `undefined`. | ||
* | ||
* @param event The event name. | ||
* @param args Arguments used to handle the event. | ||
* | ||
* @returns A reference to the request object. | ||
*/ | ||
on(event: string, ...args: any[]): any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* @module botbuilder | ||
*/ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* Represents an Express or Restify response object. | ||
* | ||
* This interface supports the framework and is not intended to be called directly for your code. | ||
*/ | ||
export interface WebResponse { | ||
/** | ||
* | ||
* Optional. The underlying socket. | ||
*/ | ||
socket?: any; | ||
|
||
/** | ||
* When implemented in a derived class, sends a FIN packet. | ||
* | ||
* @param args The arguments for the end event. | ||
* | ||
* @returns A reference to the response object. | ||
*/ | ||
end(...args: any[]): any; | ||
|
||
/** | ||
* When implemented in a derived class, sends the response. | ||
* | ||
* @param body The response payload. | ||
* | ||
* @returns A reference to the response object. | ||
*/ | ||
send(body: any): any; | ||
|
||
/** | ||
* When implemented in a derived class, sets the HTTP status code for the response. | ||
* | ||
* @param status The status code to use. | ||
* | ||
* @returns The status code. | ||
*/ | ||
status(status: number): any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters