UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

294 lines (293 loc) 8.12 kB
/// <reference types="node" /> /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { ServiceClientOptions, RequestOptionsBase, HttpResponse } from "@azure/core-http"; import { AttachmentInfo, ChannelAccount, ConversationResourceResponse, ConversationsResult, PagedMembersResult, ResourceResponse } from "botframework-schema"; import { Agent as HttpAgent } from "http"; import { Agent as HttpsAgent } from "https"; export * from "botframework-schema"; /** * An interface representing ConnectorClientOptions. */ export interface ConnectorClientOptions extends ServiceClientOptions { /** * (Optional) baseUri will be set automatically within BotFrameworkAdapter, * but is required if using the ConnectorClient outside of the adapter. */ baseUri?: string; /** * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only). */ agentSettings?: AgentSettings; } /** * HTTP and HTTPS agents (Node.js only) */ export interface AgentSettings { http: HttpAgent; https: HttpsAgent; } /** * Optional Parameters. */ export interface ConversationsGetConversationsOptionalParams extends RequestOptionsBase { /** * skip or continuation token */ continuationToken: string; } /** * Optional Parameters. */ export interface ConversationsGetConversationPagedMembersOptionalParams extends RequestOptionsBase { /** * Suggested page size */ pageSize: number; /** * Continuation Token */ continuationToken: string; } /** * Contains response data for the getAttachmentInfo operation. */ export declare type AttachmentsGetAttachmentInfoResponse = AttachmentInfo & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: AttachmentInfo; }; }; /** * Contains response data for the getAttachment operation. */ export declare type AttachmentsGetAttachmentResponse = { /** * BROWSER ONLY * * The response body as a browser Blob. * Always undefined in node.js. */ blobBody: Promise<Blob>; /** * NODEJS ONLY * * The response body as a node.js Readable stream. * Always undefined in the browser. */ readableStreamBody: NodeJS.ReadableStream; /** * The underlying HTTP response. */ _response: HttpResponse; }; /** * Contains response data for the getConversations operation. */ export declare type ConversationsGetConversationsResponse = ConversationsResult & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ConversationsResult; }; }; /** * Contains response data for the createConversation operation. */ export declare type ConversationsCreateConversationResponse = ConversationResourceResponse & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ConversationResourceResponse; }; }; /** * Contains response data for the sendToConversation operation. */ export declare type ConversationsSendToConversationResponse = ResourceResponse & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ResourceResponse; }; }; /** * Contains response data for the sendConversationHistory operation. */ export declare type ConversationsSendConversationHistoryResponse = ResourceResponse & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ResourceResponse; }; }; /** * Contains response data for the updateActivity operation. */ export declare type ConversationsUpdateActivityResponse = ResourceResponse & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ResourceResponse; }; }; /** * Contains response data for the replyToActivity operation. */ export declare type ConversationsReplyToActivityResponse = ResourceResponse & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ResourceResponse; }; }; /** * Contains response data for the getConversationMembers operation. */ export declare type ConversationsGetConversationMembersResponse = Array<ChannelAccount> & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ChannelAccount[]; }; }; /** * Contains response data for the getConversationMember operation. */ export declare type ConversationsGetConversationMemberResponse = ChannelAccount & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ChannelAccount; }; }; /** * Contains response data for the getConversationPagedMembers operation. */ export declare type ConversationsGetConversationPagedMembersResponse = PagedMembersResult & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: PagedMembersResult; }; }; /** * Contains response data for the getActivityMembers operation. */ export declare type ConversationsGetActivityMembersResponse = Array<ChannelAccount> & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ChannelAccount[]; }; }; /** * Contains response data for the uploadAttachment operation. */ export declare type ConversationsUploadAttachmentResponse = ResourceResponse & { /** * The underlying HTTP response. */ _response: HttpResponse & { /** * The response body as text (string format) */ bodyAsText: string; /** * The response body as parsed JSON or XML */ parsedBody: ResourceResponse; }; }; //# sourceMappingURL=index.d.ts.map