aimpress-chatbot/node_modules/botframework-streaming/lib/contentStream.d.ts
“SamoilenkoVadym” 55445dbc86
Some checks failed
Build and deploy Node.js app to Azure Web App - ChatBot2222 / build (push) Has been cancelled
Build and deploy Node.js app to Azure Web App - ChatBot2222 / deploy (push) Has been cancelled
Deploy bot to Azure
2025-04-27 19:55:19 +01:00

61 lines
No EOL
2.4 KiB
TypeScript

/**
* @module botframework-streaming
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import type { PayloadAssembler } from './assemblers';
import { PayloadTypes } from './payloads';
import type { SubscribableStream } from './subscribableStream';
/**
* A stream of fixed or infinite length containing content to be decoded.
*/
export declare class ContentStream {
id: string;
private readonly assembler;
private stream;
/**
* Initializes a new instance of the [ContentStream](xref:botframework-streaming.ContentStream) class.
*
* @param id The ID assigned to this instance.
* @param assembler The [PayloadAssembler](xref:botframework-streaming.PayloadAssembler) assigned to this instance.
*/
constructor(id: string, assembler: PayloadAssembler);
/**
* Gets the name of the type of the object contained within this [ContentStream](xref:botframework-streaming.ContentStream).
*
* @returns The [PayloadType](xref:botframework-streaming.PayloadType) of this [ContentStream](xref:botframework-streaming.ContentStream).
*/
get contentType(): string | PayloadTypes;
/**
* Gets the length of this [ContentStream](xref:botframework-streaming.ContentStream).
*
* @returns A number representing the length of this [ContentStream](xref:botframework-streaming.ContentStream).
*/
get length(): number;
/**
* Gets the data contained within this [ContentStream](xref:botframework-streaming.ContentStream).
*
* @returns This [ContentStream's](xref:botframework-streaming.ContentStream) [SubscribableStream](xref:botframework-streaming.SubscribableStream).
*/
getStream(): SubscribableStream;
/**
* Closes the assembler.
*/
cancel(): void;
/**
* Gets the [SubscribableStream](xref:botframework-streaming.SubscribableStream) content as a string.
*
* @returns A string Promise with [SubscribableStream](xref:botframework-streaming.SubscribableStream) content.
*/
readAsString(): Promise<string>;
/**
* Gets the [SubscribableStream](xref:botframework-streaming.SubscribableStream) content as a typed JSON object.
*
* @returns A typed object Promise with `SubscribableStream` content.
*/
readAsJson<T>(): Promise<T>;
private readAll;
}
//# sourceMappingURL=contentStream.d.ts.map