@microsoft/msgraph-sdk-chats
Version:
Chats fluent API for Microsoft Graph
109 lines • 5.69 kB
TypeScript
import { type ChatMessage, type ChatMessageCollectionResponse } from '@microsoft/msgraph-sdk/models/index.js';
import { type CountRequestBuilder } from './count/index.js';
import { type DeltaRequestBuilder } from './delta/index.js';
import { type ChatMessageItemRequestBuilder } from './item/index.js';
import { type ReplyWithQuoteRequestBuilder } from './replyWithQuote/index.js';
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
/**
* Provides operations to manage the messages property of the microsoft.graph.chat entity.
*/
export interface MessagesRequestBuilder extends BaseRequestBuilder<MessagesRequestBuilder> {
/**
* Provides operations to count the resources in the collection.
*/
get count(): CountRequestBuilder;
/**
* Provides operations to call the delta method.
*/
get delta(): DeltaRequestBuilder;
/**
* Provides operations to call the replyWithQuote method.
*/
get replyWithQuote(): ReplyWithQuoteRequestBuilder;
/**
* Provides operations to manage the messages property of the microsoft.graph.chat entity.
* @param chatMessageId The unique identifier of chatMessage
* @returns {ChatMessageItemRequestBuilder}
*/
byChatMessageId(chatMessageId: string): ChatMessageItemRequestBuilder;
/**
* Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel).
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<ChatMessageCollectionResponse>}
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
* @see {@link https://learn.microsoft.com/graph/api/chat-list-messages?view=graph-rest-1.0|Find more info here}
*/
get(requestConfiguration?: RequestConfiguration<MessagesRequestBuilderGetQueryParameters> | undefined): Promise<ChatMessageCollectionResponse | undefined>;
/**
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {Promise<ChatMessage>}
* @throws {ODataError} error when the service returns a 4XX or 5XX status code
* @see {@link https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0|Find more info here}
*/
post(body: ChatMessage, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<ChatMessage | undefined>;
/**
* Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel).
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/
toGetRequestInformation(requestConfiguration?: RequestConfiguration<MessagesRequestBuilderGetQueryParameters> | undefined): RequestInformation;
/**
* Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns {RequestInformation}
*/
toPostRequestInformation(body: ChatMessage, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
}
/**
* Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel).
*/
export interface MessagesRequestBuilderGetQueryParameters {
/**
* Include count of items
*/
count?: boolean;
/**
* Expand related entities
*/
expand?: string[];
/**
* Filter items by property values
*/
filter?: string;
/**
* Order items by property values
*/
orderby?: string[];
/**
* Search items by search phrases
*/
search?: string;
/**
* Select properties to be returned
*/
select?: string[];
/**
* Skip the first n items
*/
skip?: number;
/**
* Show only the first n items
*/
top?: number;
}
/**
* Uri template for the request builder.
*/
export declare const MessagesRequestBuilderUriTemplate = "{+baseurl}/chats/{chat%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}";
/**
* Metadata for all the navigation properties in the request builder.
*/
export declare const MessagesRequestBuilderNavigationMetadata: Record<Exclude<keyof MessagesRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>;
/**
* Metadata for all the requests in the request builder.
*/
export declare const MessagesRequestBuilderRequestsMetadata: RequestsMetadata;
//# sourceMappingURL=index.d.ts.map