@azure/communication-common package
类
| AzureCommunicationTokenCredential |
CommunicationTokenCredential 实现,支持主动令牌刷新。 |
接口
| CommunicationGetTokenOptions |
用于 |
| CommunicationTokenCredential |
Azure 通信服务令牌凭据。 |
| CommunicationTokenRefreshOptions |
自动刷新通信令牌凭据的选项。 |
| CommunicationUserIdentifier |
Azure 通信用户。 |
| CommunicationUserKind |
CommunicationUserIdentifier 的 IdentifierKind。 |
| EntraCommunicationTokenCredentialOptions |
Entra 通信令牌选项。 |
| MicrosoftTeamsAppIdentifier |
Microsoft Teams 应用。 |
| MicrosoftTeamsAppKind |
MicrosoftTeamsAppIdentifier 的 IdentifierKind。 |
| MicrosoftTeamsUserIdentifier |
Microsoft Teams 用户。 |
| MicrosoftTeamsUserKind |
MicrosoftTeamsUserIdentifier 的 IdentifierKind。 |
| PhoneNumberIdentifier |
电话号码。 |
| PhoneNumberKind |
PhoneNumberIdentifier 的 IdentifierKind。 |
| TeamsExtensionUserIdentifier |
使用 Azure 通信服务资源扩展其 Teams 电话设置的 Microsoft Teams 电话用户。 |
| TeamsExtensionUserKind |
IdentifierKind 的 TeamsExtensionUserIdentifier。 |
| UnknownIdentifier |
不符合其他任何标识符类型的未知标识符。 |
| UnknownIdentifierKind |
UnknownIdentifier 的 IdentifierKind。 |
类型别名
| CommunicationIdentifier |
标识通信参与者。 |
| CommunicationIdentifierKind |
CommunicationIdentifierKind 是一个区分的联合,用于向标识符添加属性 |
函数
| create |
从给定 rawId 创建 CommunicationIdentifierKind。 存储 rawId 时,使用此函数还原在 rawId 中编码的标识符。 |
| get |
返回给定 CommunicationIdentifier 的 CommunicationIdentifierKind。 如果无法推断类型,则返回未定义。 |
| get |
返回给定 CommunicationIdentifier 的 rawId。 可以使用 rawId 对标识符进行编码,然后将其用作数据库中的密钥。 |
| is |
测试标识符以确定它是否实现 CommunicationUserIdentifier。 |
| is |
检查值是否为 KeyCredential。 |
| is |
测试标识符以确定它是否实现 MicrosoftTeamsAppIdentifier。 |
| is |
测试标识符以确定它是否实现 MicrosoftTeamsUserIdentifier。 |
| is |
测试标识符以确定它是否实现 PhoneNumberIdentifier。 |
| is |
测试 Identifier 以确定它是否实现 TeamsExtensionUserIdentifier。 |
| is |
测试标识符以确定它是否实现 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
isTeamsExtensionUserIdentifier(CommunicationIdentifier)
测试 Identifier 以确定它是否实现 TeamsExtensionUserIdentifier。
function isTeamsExtensionUserIdentifier(identifier: CommunicationIdentifier): identifier
参数
- identifier
- CommunicationIdentifier
假定可供测试。
返回
identifier
isUnknownIdentifier(CommunicationIdentifier)
测试标识符以确定它是否实现 UnknownIdentifier。
function isUnknownIdentifier(identifier: CommunicationIdentifier): identifier
参数
- identifier
- CommunicationIdentifier
要测试的假定 UnknownIdentifier。
返回
identifier