@azure/communication-common package
Classes
| AzureCommunicationTokenCredential |
The CommunicationTokenCredential implementation with support for proactive token refresh. |
Interfaces
| CommunicationGetTokenOptions |
Options for |
| CommunicationTokenCredential |
The Azure Communication Services token credential. |
| CommunicationTokenRefreshOptions |
Options for auto-refreshing a Communication Token credential. |
| CommunicationUserIdentifier |
An Azure Communication user. |
| CommunicationUserKind |
IdentifierKind for a CommunicationUserIdentifier. |
| EntraCommunicationTokenCredentialOptions |
The Entra Communication Token Options. |
| MicrosoftTeamsAppIdentifier |
A Microsoft Teams App. |
| MicrosoftTeamsAppKind |
IdentifierKind for a MicrosoftTeamsAppIdentifier. |
| MicrosoftTeamsUserIdentifier |
A Microsoft Teams user. |
| MicrosoftTeamsUserKind |
IdentifierKind for a MicrosoftTeamsUserIdentifier. |
| PhoneNumberIdentifier |
A phone number. |
| PhoneNumberKind |
IdentifierKind for a PhoneNumberIdentifier. |
| TeamsExtensionUserIdentifier |
A Microsoft Teams Phone user who is using the Azure Communication Services resource to extend their Teams Phone set up. |
| TeamsExtensionUserKind |
IdentifierKind for a TeamsExtensionUserIdentifier. |
| UnknownIdentifier |
An unknown identifier that doesn't fit any of the other identifier types. |
| UnknownIdentifierKind |
IdentifierKind for UnknownIdentifier. |
Type Aliases
| CommunicationIdentifier |
Identifies a communication participant. |
| CommunicationIdentifierKind |
The CommunicationIdentifierKind is a discriminated union that adds a property |
Functions
| is |
Typeguard for RestError |
Variables
| Rest |
A custom error type for failed pipeline requests. |
| create |
Creates a CommunicationIdentifierKind from a given rawId. When storing rawIds use this function to restore the identifier that was encoded in the rawId. |
| get |
Returns the CommunicationIdentifierKind for a given CommunicationIdentifier. Returns undefined if the kind couldn't be inferred. |
| get |
Returns the rawId for a given CommunicationIdentifier. You can use the rawId for encoding the identifier and then use it as a key in a database. |
| is |
Tests an Identifier to determine whether it implements CommunicationUserIdentifier. |
| is |
Checks whether a value is a KeyCredential. |
| is |
Tests an Identifier to determine whether it implements MicrosoftTeamsAppIdentifier. |
| is |
Tests an Identifier to determine whether it implements MicrosoftTeamsUserIdentifier. |
| is |
Tests an Identifier to determine whether it implements PhoneNumberIdentifier. |
| is |
Tests an Identifier to determine whether it implements TeamsExtensionUserIdentifier. |
| is |
Tests an Identifier to determine whether it implements UnknownIdentifier. |
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
createIdentifierFromRawId
Creates a CommunicationIdentifierKind from a given rawId. When storing rawIds use this function to restore the identifier that was encoded in the rawId.
createIdentifierFromRawId: (rawId: string) => CommunicationIdentifierKind
Type
(rawId: string) => CommunicationIdentifierKind
getIdentifierKind
Returns the CommunicationIdentifierKind for a given CommunicationIdentifier. Returns undefined if the kind couldn't be inferred.
getIdentifierKind: (identifier: CommunicationIdentifier) => CommunicationIdentifierKind
Type
(identifier: CommunicationIdentifier) => CommunicationIdentifierKind
getIdentifierRawId
Returns the rawId for a given CommunicationIdentifier. You can use the rawId for encoding the identifier and then use it as a key in a database.
getIdentifierRawId: (identifier: CommunicationIdentifier) => string
Type
(identifier: CommunicationIdentifier) => string
isCommunicationUserIdentifier
Tests an Identifier to determine whether it implements CommunicationUserIdentifier.
isCommunicationUserIdentifier: (identifier: CommunicationIdentifier) => identifier is CommunicationUserIdentifier
Type
(identifier: CommunicationIdentifier) => identifier is CommunicationUserIdentifier
isKeyCredential
Checks whether a value is a KeyCredential.
isKeyCredential: (credential: unknown) => credential is KeyCredential
Type
(credential: unknown) => credential is KeyCredential
isMicrosoftTeamsAppIdentifier
Tests an Identifier to determine whether it implements MicrosoftTeamsAppIdentifier.
isMicrosoftTeamsAppIdentifier: (identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsAppIdentifier
Type
(identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsAppIdentifier
isMicrosoftTeamsUserIdentifier
Tests an Identifier to determine whether it implements MicrosoftTeamsUserIdentifier.
isMicrosoftTeamsUserIdentifier: (identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsUserIdentifier
Type
(identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsUserIdentifier
isPhoneNumberIdentifier
Tests an Identifier to determine whether it implements PhoneNumberIdentifier.
isPhoneNumberIdentifier: (identifier: CommunicationIdentifier) => identifier is PhoneNumberIdentifier
Type
(identifier: CommunicationIdentifier) => identifier is PhoneNumberIdentifier
isTeamsExtensionUserIdentifier
Tests an Identifier to determine whether it implements TeamsExtensionUserIdentifier.
isTeamsExtensionUserIdentifier: (identifier: CommunicationIdentifier) => identifier is TeamsExtensionUserIdentifier
Type
(identifier: CommunicationIdentifier) => identifier is TeamsExtensionUserIdentifier
isUnknownIdentifier
Tests an Identifier to determine whether it implements UnknownIdentifier.
isUnknownIdentifier: (identifier: CommunicationIdentifier) => identifier is UnknownIdentifier
Type
(identifier: CommunicationIdentifier) => identifier is UnknownIdentifier