Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export models from signaling client #18105

Merged
merged 2 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/// <reference lib="esnext.asynciterable" />

import { ChatEventId } from '@azure/communication-signaling';
import { ChatMessageDeletedEvent } from '@azure/communication-signaling';
import { ChatMessageEditedEvent } from '@azure/communication-signaling';
import { ChatMessageReceivedEvent } from '@azure/communication-signaling';
Expand Down Expand Up @@ -81,6 +82,8 @@ export interface ChatError {
readonly target?: string;
}

export { ChatEventId }

// @public
export interface ChatMessage {
content?: ChatMessageContent;
Expand All @@ -104,13 +107,19 @@ export interface ChatMessageContent {
topic?: string;
}

export { ChatMessageDeletedEvent }

export { ChatMessageEditedEvent }

// @public
export interface ChatMessageReadReceipt {
chatMessageId: string;
readOn: Date;
sender: CommunicationIdentifierKind;
}

export { ChatMessageReceivedEvent }

// @public
export type ChatMessageType = "text" | "html" | "topicUpdated" | "participantAdded" | "participantRemoved";

Expand Down Expand Up @@ -144,6 +153,10 @@ export class ChatThreadClient {
export interface ChatThreadClientOptions extends ChatClientOptions {
}

export { ChatThreadCreatedEvent }

export { ChatThreadDeletedEvent }

// @public
export interface ChatThreadItem {
deletedOn?: Date;
Expand All @@ -161,6 +174,8 @@ export interface ChatThreadProperties {
topic: string;
}

export { ChatThreadPropertiesUpdatedEvent }

// @public
export interface CreateChatThreadOptions extends OperationOptions {
idempotencyToken?: string;
Expand Down Expand Up @@ -207,6 +222,12 @@ export type ListParticipantsOptions = RestListParticipantsOptions;
// @public
export type ListReadReceiptsOptions = RestListReadReceiptsOptions;

export { ParticipantsAddedEvent }

export { ParticipantsRemovedEvent }

export { ReadReceiptReceivedEvent }

// @public
export type RemoveParticipantOptions = OperationOptions;

Expand Down Expand Up @@ -264,6 +285,8 @@ export interface SendTypingNotificationOptions extends OperationOptions {
senderDisplayName?: string;
}

export { TypingIndicatorReceivedEvent }

// @public
export interface UpdateMessageOptions extends OperationOptions {
content?: string;
Expand Down
28 changes: 14 additions & 14 deletions sdk/communication/communication-chat/src/chatClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@
import { logger } from "./models/logger";
import { EventEmitter } from "events";
import { CommunicationTokenCredential } from "@azure/communication-common";
import {
SignalingClient,
ChatEventId,
ChatMessageReceivedEvent,
ChatMessageEditedEvent,
ChatMessageDeletedEvent,
ReadReceiptReceivedEvent,
TypingIndicatorReceivedEvent,
ChatThreadCreatedEvent,
ChatThreadDeletedEvent,
ChatThreadPropertiesUpdatedEvent,
ParticipantsAddedEvent,
ParticipantsRemovedEvent
} from "@azure/communication-signaling";
import { getSignalingClient } from "./signaling/signalingClient";
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { SpanStatusCode } from "@azure/core-tracing";
Expand All @@ -41,6 +27,20 @@ import { ChatApiClient } from "./generated/src";
import { CreateChatThreadRequest } from "./models/requests";
import { createCommunicationTokenCredentialPolicy } from "./credential/communicationTokenCredentialPolicy";
import { generateUuid } from "./models/uuid";
import { SignalingClient } from "@azure/communication-signaling";
import {
ChatEventId,
ChatMessageReceivedEvent,
ChatMessageEditedEvent,
ChatMessageDeletedEvent,
ReadReceiptReceivedEvent,
TypingIndicatorReceivedEvent,
ChatThreadCreatedEvent,
ChatThreadDeletedEvent,
ChatThreadPropertiesUpdatedEvent,
ParticipantsAddedEvent,
ParticipantsRemovedEvent
} from "./models/events";

/**
* The client to do chat operations
Expand Down
1 change: 1 addition & 0 deletions sdk/communication/communication-chat/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
export * from "./models/options";
export * from "./models/requests";
export * from "./models/models";
export * from "./models/events";
export * from "./chatClient";
export * from "./chatThreadClient";
30 changes: 30 additions & 0 deletions sdk/communication/communication-chat/src/models/events.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import {
ChatEventId,
ChatMessageReceivedEvent,
ChatMessageEditedEvent,
ChatMessageDeletedEvent,
ReadReceiptReceivedEvent,
TypingIndicatorReceivedEvent,
ChatThreadCreatedEvent,
ChatThreadDeletedEvent,
ChatThreadPropertiesUpdatedEvent,
ParticipantsAddedEvent,
ParticipantsRemovedEvent
} from "@azure/communication-signaling";

export {
ChatEventId,
ChatMessageReceivedEvent,
ChatMessageEditedEvent,
ChatMessageDeletedEvent,
ReadReceiptReceivedEvent,
TypingIndicatorReceivedEvent,
ChatThreadCreatedEvent,
ChatThreadDeletedEvent,
ChatThreadPropertiesUpdatedEvent,
ParticipantsAddedEvent,
ParticipantsRemovedEvent
};