共用方式為


@azure/communication-common package

類別

AzureCommunicationTokenCredential

具有主動式令牌重新整理支援的 CommunicationTokenCredential 實作。

介面

CommunicationGetTokenOptions

CommunicationTokenCredential getToken 函式的選項。

CommunicationTokenCredential

Azure 通訊服務令牌認證。

CommunicationTokenRefreshOptions

自動重新整理通訊令牌認證的選項。

CommunicationUserIdentifier

Azure 通訊使用者。

CommunicationUserKind

CommunicationUserIdentifier 的 IdentifierKind。

MicrosoftTeamsAppIdentifier

Microsoft Teams 應用程式。

MicrosoftTeamsAppKind

MicrosoftTeamsAppIdentifier 的 IdentifierKind。

MicrosoftTeamsUserIdentifier

Microsoft Teams 使用者。

MicrosoftTeamsUserKind

MicrosoftTeamsUserIdentifier 的 IdentifierKind。

PhoneNumberIdentifier

電話號碼。

PhoneNumberKind

PhoneNumberIdentifier 的 IdentifierKind。

UnknownIdentifier

不符合任何其他識別碼類型的未知識別碼。

UnknownIdentifierKind

UnknownIdentifier 的 IdentifierKind。

類型別名

CommunicationIdentifier

識別通訊參與者。

CommunicationIdentifierKind

CommunicationIdentifierKind 是一種歧視聯集,會將屬性 kind 新增至 Identifier。

函式

createIdentifierFromRawId(string)

從指定的 rawId 建立 CommunicationIdentifierKind。 儲存rawId時,使用此函式來還原rawId中編碼的標識碼。

getIdentifierKind(CommunicationIdentifier)

傳回指定 CommunicationIdentifier 的 CommunicationIdentifierKind。 如果無法推斷種類,則傳回未定義。

getIdentifierRawId(CommunicationIdentifier)

傳回指定 CommunicationIdentifier 的 rawId。 您可以使用rawId來編碼標識碼,然後將它當做資料庫中的索引鍵使用。

isCommunicationUserIdentifier(CommunicationIdentifier)

測試標識符,以判斷它是否實作 CommunicationUserIdentifier。

isKeyCredential(unknown)

檢查值是否為 KeyCredential。

isMicrosoftTeamsAppIdentifier(CommunicationIdentifier)

測試標識符,以判斷它是否實作 MicrosoftTeamsAppIdentifier。

isMicrosoftTeamsUserIdentifier(CommunicationIdentifier)

測試標識符,以判斷它是否實作 MicrosoftTeamsUserIdentifier。

isPhoneNumberIdentifier(CommunicationIdentifier)

測試標識碼,以判斷它是否實作 PhoneNumberIdentifier。

isUnknownIdentifier(CommunicationIdentifier)

測試標識碼,以判斷它是否實作 UnknownIdentifier。

函式詳細資料

createIdentifierFromRawId(string)

從指定的 rawId 建立 CommunicationIdentifierKind。 儲存rawId時,使用此函式來還原rawId中編碼的標識碼。

function createIdentifierFromRawId(rawId: string): CommunicationIdentifierKind

參數

rawId

string

要轉譯為其標識符表示法的rawId。

傳回

getIdentifierKind(CommunicationIdentifier)

傳回指定 CommunicationIdentifier 的 CommunicationIdentifierKind。 如果無法推斷種類,則傳回未定義。

function getIdentifierKind(identifier: CommunicationIdentifier): CommunicationIdentifierKind

參數

identifier
CommunicationIdentifier

要推斷其種類的標識碼。

傳回

getIdentifierRawId(CommunicationIdentifier)

傳回指定 CommunicationIdentifier 的 rawId。 您可以使用rawId來編碼標識碼,然後將它當做資料庫中的索引鍵使用。

function getIdentifierRawId(identifier: CommunicationIdentifier): string

參數

identifier
CommunicationIdentifier

要轉譯為其rawId的標識碼。

傳回

string

isCommunicationUserIdentifier(CommunicationIdentifier)

測試標識符,以判斷它是否實作 CommunicationUserIdentifier。

function isCommunicationUserIdentifier(identifier: CommunicationIdentifier): identifier

參數

identifier
CommunicationIdentifier

要測試的假設 CommunicationUserIdentifier。

傳回

identifier

isKeyCredential(unknown)

檢查值是否為 KeyCredential。

function isKeyCredential(credential: unknown): credential

參數

credential

unknown

正在檢查的認證。

傳回

credential

isMicrosoftTeamsAppIdentifier(CommunicationIdentifier)

測試標識符,以判斷它是否實作 MicrosoftTeamsAppIdentifier。

function isMicrosoftTeamsAppIdentifier(identifier: CommunicationIdentifier): identifier

參數

identifier
CommunicationIdentifier

假設可供測試。

傳回

identifier

isMicrosoftTeamsUserIdentifier(CommunicationIdentifier)

測試標識符,以判斷它是否實作 MicrosoftTeamsUserIdentifier。

function isMicrosoftTeamsUserIdentifier(identifier: CommunicationIdentifier): identifier

參數

identifier
CommunicationIdentifier

假設可供測試。

傳回

identifier

isPhoneNumberIdentifier(CommunicationIdentifier)

測試標識碼,以判斷它是否實作 PhoneNumberIdentifier。

function isPhoneNumberIdentifier(identifier: CommunicationIdentifier): identifier

參數

identifier
CommunicationIdentifier

要測試的假設 PhoneNumberIdentifier。

傳回

identifier

isUnknownIdentifier(CommunicationIdentifier)

測試標識碼,以判斷它是否實作 UnknownIdentifier。

function isUnknownIdentifier(identifier: CommunicationIdentifier): identifier

參數

identifier
CommunicationIdentifier

要測試的 UnknownIdentifier。

傳回

identifier