Udostępnij za pośrednictwem


@azure/communication-common package

Klasy

AzureCommunicationTokenCredential

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

Interfejsy

CommunicationGetTokenOptions

Opcje funkcji getTokenCommunicationTokenCredential.

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.

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.

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

createIdentifierFromRawId(string)

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(CommunicationIdentifier)

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

getIdentifierRawId(CommunicationIdentifier)

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(CommunicationIdentifier)

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

isKeyCredential(unknown)

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

isMicrosoftTeamsAppIdentifier(CommunicationIdentifier)

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

isMicrosoftTeamsUserIdentifier(CommunicationIdentifier)

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

isPhoneNumberIdentifier(CommunicationIdentifier)

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

isUnknownIdentifier(CommunicationIdentifier)

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

Szczegóły funkcji

createIdentifierFromRawId(string)

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.

function createIdentifierFromRawId(rawId: string): CommunicationIdentifierKind

Parametry

rawId

string

Nieprzetworzone identyfikatory, które mają zostać przetłumaczone na jego reprezentację identyfikatora.

Zwraca

getIdentifierKind(CommunicationIdentifier)

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

function getIdentifierKind(identifier: CommunicationIdentifier): CommunicationIdentifierKind

Parametry

identifier
CommunicationIdentifier

Identyfikator, którego rodzaj ma zostać wywnioskowany.

Zwraca

getIdentifierRawId(CommunicationIdentifier)

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.

function getIdentifierRawId(identifier: CommunicationIdentifier): string

Parametry

identifier
CommunicationIdentifier

Identyfikator, który ma zostać przetłumaczony na jego nieprzetworzone identyfikatory.

Zwraca

string

isCommunicationUserIdentifier(CommunicationIdentifier)

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

function isCommunicationUserIdentifier(identifier: CommunicationIdentifier): identifier

Parametry

identifier
CommunicationIdentifier

Przyjęto założenie, że element CommunicationUserIdentifier ma zostać przetestowany.

Zwraca

identifier

isKeyCredential(unknown)

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

function isKeyCredential(credential: unknown): credential

Parametry

credential

unknown

Sprawdzane jest poświadczenie.

Zwraca

credential

isMicrosoftTeamsAppIdentifier(CommunicationIdentifier)

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

function isMicrosoftTeamsAppIdentifier(identifier: CommunicationIdentifier): identifier

Parametry

identifier
CommunicationIdentifier

Zakładane dostępne do przetestowania.

Zwraca

identifier

isMicrosoftTeamsUserIdentifier(CommunicationIdentifier)

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

function isMicrosoftTeamsUserIdentifier(identifier: CommunicationIdentifier): identifier

Parametry

identifier
CommunicationIdentifier

Zakładane dostępne do przetestowania.

Zwraca

identifier

isPhoneNumberIdentifier(CommunicationIdentifier)

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

function isPhoneNumberIdentifier(identifier: CommunicationIdentifier): identifier

Parametry

identifier
CommunicationIdentifier

Zakładany phoneNumberIdentifier do przetestowania.

Zwraca

identifier

isUnknownIdentifier(CommunicationIdentifier)

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

function isUnknownIdentifier(identifier: CommunicationIdentifier): identifier

Parametry

identifier
CommunicationIdentifier

Zakładany nieznanyidentifier do przetestowania.

Zwraca

identifier