@azure/web-pubsub-chat package

Classes

AzureKeyCredential

A static-key-based credential that supports updating the underlying key value.

WebPubSubChatServiceClient

A client for managing chat resources in an Azure Web PubSub Chat hub.

Interfaces

ChatConversation

Represents a chat conversation.

ChatMessage

Represents a chat message.

ChatMessageUpdate

Properties supplied when partially updating a message.

ChatRole

Represents a chat role. A role name must start with 'user.' or 'room.' prefix. A role must contain either user permissions or room permissions, but not both.

ChatRoleCreateOrReplace

Properties supplied when creating or replacing a role.

ChatRoom

Represents a chat room.

ChatRoomCreateOrReplace

Properties supplied when creating or replacing a room.

ChatRoomMember

Represents a room member.

ChatRoomMemberCreateOrReplace

Properties supplied when creating or replacing a room member.

ChatTopic

Represents a chat topic in a room.

ChatTopicCreateOrReplace

Properties supplied when creating or replacing a topic.

ChatTopicUpdate

Properties supplied when partially updating a topic.

ChatUser

Represents a user profile in the chat system. This is a discriminated base type; concrete payloads are selected by the kind field (e.g. HumanChatUser).

ChatUserCreateOrReplace

Properties supplied when creating or replacing a user.

ChatUserRoom

Represents a read-only room projection used to list rooms associated with a user. This model enables the standard resource operation to derive the /api/hubs/{hub}/chat/users/{userId}/rooms collection path because ChatRoom is a child of Hub, not ChatUser. This model does not define an independent room lifecycle.

ClientAccessToken

A chat client access token and connection URLs.

CreateOrReplaceRoleOptionalParams

Optional parameters.

CreateOrReplaceRoomMemberOptionalParams

Optional parameters.

CreateOrReplaceRoomOptionalParams

Optional parameters.

CreateOrReplaceTopicOptionalParams

Optional parameters.

CreateOrReplaceUserOptionalParams

Optional parameters.

DeleteMessageOptionalParams

Optional parameters.

DeleteRoleOptionalParams

Optional parameters.

DeleteRoomMemberOptionalParams

Optional parameters.

DeleteRoomOptionalParams

Optional parameters.

DeleteTopicOptionalParams

Optional parameters.

DeleteUserOptionalParams

Optional parameters.

GetClientAccessTokenOptions

Options for generating a chat client access token.

GetConversationOptionalParams

Optional parameters.

GetRoleOptionalParams

Optional parameters.

GetRoomOptionalParams

Optional parameters.

GetTopicOptionalParams

Optional parameters.

GetUserOptionalParams

Optional parameters.

HumanChatUser

A human end-user, identified by a user role.

HumanChatUserCreateOrReplace

Properties supplied when creating or replacing a human user.

ListMessagesOptionalParams

Optional parameters.

ListRolesOptionalParams

Optional parameters.

ListRoomMembersOptionalParams

Optional parameters.

ListRoomsForUserOptionalParams

Optional parameters.

ListRoomsOptionalParams

Optional parameters.

ListTopicsOptionalParams

Optional parameters.

ListUsersOptionalParams

Optional parameters.

MessageContent

Message content body.

PageSettings

Options for the byPage method

PagedAsyncIterableIterator

An interface that allows async iterable iteration both to completion and by page.

UpdateMessageOptionalParams

Optional parameters.

UpdateTopicOptionalParams

Optional parameters.

WebPubSubChatServiceClientOptionalParams

Optional parameters for the client.

WebPubSubChatServiceClientOptions

Options for configuring the Web PubSub Chat service client.

Type Aliases

ChatPermission

A permission that can be assigned to a chat role. KnownChatPermission can be used interchangeably with ChatPermission, this enum contains the known values that the service supports.

Known values supported by the service

user.create_room: Allows a user to create chat rooms. user.fetch_all_rooms: Allows a user to list the rooms they belong to. room.publish_message: Allows a room member to publish messages. room.history: Allows a room member to read message history. room.invite: Allows a room member to add users to a room. room.remove_user: Allows a room operator to remove users from a room.

ChatTopicState

The lifecycle state of a chat topic. KnownChatTopicState can be used interchangeably with ChatTopicState, this enum contains the known values that the service supports.

Known values supported by the service

Normal: The topic is active. Archived: The topic is archived. SoftDeleted: The topic has been soft deleted.

ChatUserCreateOrReplaceUnion

Alias for ChatUserCreateOrReplaceUnion

ChatUserKind

Discriminator for the kind of chat user. <xref:KnownChatUserKind> can be used interchangeably with ChatUserKind, this enum contains the known values that the service supports.

Known values supported by the service

Human: A human end-user.

ChatUserUnion

Alias for ChatUserUnion

ContinuablePage

An interface that describes a page of results.

Enums

KnownChatPermission

A permission that can be assigned to a chat role.

KnownChatTopicState

The lifecycle state of a chat topic.

KnownVersions

Service API versions.

Functions

isRestError(unknown)

Typeguard for RestError

Variables

RestError

A custom error type for failed pipeline requests.

BuiltInChatRoles

Built-in roles supported by Web PubSub Chat.

Function Details

isRestError(unknown)

Typeguard for RestError

function isRestError(e: unknown): e is RestError

Parameters

e

unknown

Something caught by a catch clause.

Returns

e is RestError

Variable Details

RestError

A custom error type for failed pipeline requests.

RestError: RestErrorConstructor

Type

BuiltInChatRoles

Built-in roles supported by Web PubSub Chat.

BuiltInChatRoles: { RoomMember: "room.member", RoomOperator: "room.operator", UserNormal: "user.normal" }

Type

{ RoomMember: "room.member", RoomOperator: "room.operator", UserNormal: "user.normal" }