@azure/communication-common package

Klasy

AzureCommunicationTokenCredential

Implementacja CommunicationTokenCredential z obsługą proaktywnego odświeżania tokenu.

Interfejsy

CommunicationGetTokenOptions

Opcje funkcji CommunicationTokenCredentialgetToken.

CommunicationTokenCredential

Poświadczenia tokenu usług Azure Communication Services.

CommunicationTokenRefreshOptions

Opcje automatycznego odświeżania poświadczeń tokenu komunikacji.

CommunicationUserIdentifier

Użytkownik usługi Azure Communication.

CommunicationUserKind

IdentifierKind dla elementu CommunicationUserIdentifier.

EntraCommunicationTokenCredentialOptions

Opcje tokena komunikacyjnego Entra.

MicrosoftTeamsAppIdentifier

Aplikacja Microsoft Teams.

MicrosoftTeamsAppKind

IdentifierKind dla microsoftTeamsAppIdentifier.

MicrosoftTeamsUserIdentifier

Użytkownik usługi Microsoft Teams.

MicrosoftTeamsUserKind

IdentifierKind dla elementu MicrosoftTeamsUserIdentifier.

PhoneNumberIdentifier

Numer telefonu.

PhoneNumberKind

IdentifierKind dla phoneNumberIdentifier.

TeamsExtensionUserIdentifier

Użytkownik usługi Telefon w usłudze Microsoft Teams, który korzysta z zasobu usług Azure Communication Services w celu rozszerzenia konfiguracji usługi Telefon w usłudze Teams.

TeamsExtensionUserKind

IdentifierKind dla elementu TeamsExtensionUserIdentifier.

UnknownIdentifier

Nieznany identyfikator, który nie pasuje do żadnego z innych typów identyfikatorów.

UnknownIdentifierKind

IdentifierKind dla UnknownIdentifier.

Aliasy typu

CommunicationIdentifier

Identyfikuje uczestnika komunikacji.

CommunicationIdentifierKind

CommunicationIdentifierKind to dyskryminowany związek, który dodaje właściwość kind do identyfikatora.

Funkcje

isRestError(unknown)

Funkcja Typeguard dla błędu RestError

Zmienne

RestError

Niestandardowy typ błędu dla żądań potoku, który zakończył się niepowodzeniem.

createIdentifierFromRawId

Tworzy identyfikator CommunicationIdentifierKind na podstawie danego identyfikatora rawId. Podczas przechowywania nieprzetworzonych identyfikatorów użyj tej funkcji, aby przywrócić identyfikator zakodowany w identyfikatorze rawId.

getIdentifierKind

Zwraca wartość CommunicationIdentifierKind dla danego elementu CommunicationIdentifier. Zwraca niezdefiniowane, jeśli nie można wywnioskować rodzaju.

getIdentifierRawId

Zwraca wartość rawId dla danego identyfikatora CommunicationIdentifier. Możesz użyć wartości rawId do kodowania identyfikatora, a następnie użyć go jako klucza w bazie danych.

isCommunicationUserIdentifier

Testuje identyfikator, aby określić, czy implementuje element CommunicationUserIdentifier.

isKeyCredential

Sprawdza, czy wartość jest wartością KeyCredential.

isMicrosoftTeamsAppIdentifier

Testuje identyfikator, aby określić, czy implementuje microsoftTeamsAppIdentifier.

isMicrosoftTeamsUserIdentifier

Testuje identyfikator, aby określić, czy implementuje element MicrosoftTeamsUserIdentifier.

isPhoneNumberIdentifier

Testuje identyfikator, aby określić, czy implementuje phoneNumberIdentifier.

isTeamsExtensionUserIdentifier

Testuje identyfikator, aby określić, czy implementuje on element TeamsExtensionUserIdentifier.

isUnknownIdentifier

Testuje identyfikator, aby określić, czy implementuje nieznanyidentifier.

Szczegóły funkcji

isRestError(unknown)

Funkcja Typeguard dla błędu RestError

function isRestError(e: unknown): e is RestError

Parametry

e

unknown

Coś złapanego przez klauzulę catch.

Zwraca

e is RestError

Szczegóły zmiennej

RestError

Niestandardowy typ błędu dla żądań potoku, który zakończył się niepowodzeniem.

RestError: RestErrorConstructor

Typ

createIdentifierFromRawId

Tworzy identyfikator CommunicationIdentifierKind na podstawie danego identyfikatora rawId. Podczas przechowywania nieprzetworzonych identyfikatorów użyj tej funkcji, aby przywrócić identyfikator zakodowany w identyfikatorze rawId.

createIdentifierFromRawId: (rawId: string) => CommunicationIdentifierKind

Typ

(rawId: string) => CommunicationIdentifierKind

getIdentifierKind

Zwraca wartość CommunicationIdentifierKind dla danego elementu CommunicationIdentifier. Zwraca niezdefiniowane, jeśli nie można wywnioskować rodzaju.

getIdentifierKind: (identifier: CommunicationIdentifier) => CommunicationIdentifierKind

Typ

(identifier: CommunicationIdentifier) => CommunicationIdentifierKind

getIdentifierRawId

Zwraca wartość rawId dla danego identyfikatora CommunicationIdentifier. Możesz użyć wartości rawId do kodowania identyfikatora, a następnie użyć go jako klucza w bazie danych.

getIdentifierRawId: (identifier: CommunicationIdentifier) => string

Typ

(identifier: CommunicationIdentifier) => string

isCommunicationUserIdentifier

Testuje identyfikator, aby określić, czy implementuje element CommunicationUserIdentifier.

isCommunicationUserIdentifier: (identifier: CommunicationIdentifier) => identifier is CommunicationUserIdentifier

Typ

(identifier: CommunicationIdentifier) => identifier is CommunicationUserIdentifier

isKeyCredential

Sprawdza, czy wartość jest wartością KeyCredential.

isKeyCredential: (credential: unknown) => credential is KeyCredential

Typ

(credential: unknown) => credential is KeyCredential

isMicrosoftTeamsAppIdentifier

Testuje identyfikator, aby określić, czy implementuje microsoftTeamsAppIdentifier.

isMicrosoftTeamsAppIdentifier: (identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsAppIdentifier

Typ

(identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsAppIdentifier

isMicrosoftTeamsUserIdentifier

Testuje identyfikator, aby określić, czy implementuje element MicrosoftTeamsUserIdentifier.

isMicrosoftTeamsUserIdentifier: (identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsUserIdentifier

Typ

(identifier: CommunicationIdentifier) => identifier is MicrosoftTeamsUserIdentifier

isPhoneNumberIdentifier

Testuje identyfikator, aby określić, czy implementuje phoneNumberIdentifier.

isPhoneNumberIdentifier: (identifier: CommunicationIdentifier) => identifier is PhoneNumberIdentifier

Typ

(identifier: CommunicationIdentifier) => identifier is PhoneNumberIdentifier

isTeamsExtensionUserIdentifier

Testuje identyfikator, aby określić, czy implementuje on element TeamsExtensionUserIdentifier.

isTeamsExtensionUserIdentifier: (identifier: CommunicationIdentifier) => identifier is TeamsExtensionUserIdentifier

Typ

(identifier: CommunicationIdentifier) => identifier is TeamsExtensionUserIdentifier

isUnknownIdentifier

Testuje identyfikator, aby określić, czy implementuje nieznanyidentifier.

isUnknownIdentifier: (identifier: CommunicationIdentifier) => identifier is UnknownIdentifier

Typ

(identifier: CommunicationIdentifier) => identifier is UnknownIdentifier