Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/communication-common

Package version

Index

Type aliases

Identifier

Identifies a communication user.

IdentifierKind

The IdentifierKind is a discriminated union that adds a property kind to an Identifier.

UrlWithCredential

UrlWithCredential: { credential: KeyCredential; url: string }

The URL and credential from parsing the arguments of a communication client.

Type declaration

  • credential: KeyCredential
  • url: string

UserCredential

UserCredential: Pick<AzureCommunicationUserCredential, "getToken" | "dispose">

Variables

Const CONNECTION_STRING_REGEX

CONNECTION_STRING_REGEX: Object = /endpoint=(.*);accesskey=(.*)/i

Const defaultRefreshingInterval

defaultRefreshingInterval: number = minutesToMs(10)

Const globalRef

globalRef: any = globalThis

Functions

Const assertValidEndpoint

  • assertValidEndpoint(host: string): void

Const createCommunicationAccessKeyCredentialPolicy

  • createCommunicationAccessKeyCredentialPolicy(credential: KeyCredential): RequestPolicyFactory

encodeBase64

  • encodeBase64(value: ArrayBuffer): string

Const encodeUTF8

  • encodeUTF8(str: string): Uint8Array

encodeUTF8fromBase64

  • encodeUTF8fromBase64(str: string): Uint8Array

Const getCrypto

  • getCrypto(): SubtleCrypto

Const getIdentifierKind

  • Returns the IdentifierKind for a given Identifier. Returns undefined if the kind couldn't be inferred.

    Parameters

    • identifier: Identifier

      The identifier whose kind is to be inferred.

    Returns IdentifierKind

Const isCallingApplication

  • isCallingApplication(identifier: Identifier): identifier is CallingApplication
  • Tests an Identifier to determine whether it implements CallingApplication.

    Parameters

    • identifier: Identifier

      The assumed CallingApplication to be tested.

    Returns identifier is CallingApplication

Const isCommunicationUser

  • isCommunicationUser(identifier: Identifier): identifier is CommunicationUser
  • Tests an Identifier to determine whether it implements CommunicationUser.

    Parameters

    • identifier: Identifier

      The assumed CommunicationUser to be tested.

    Returns identifier is CommunicationUser

Const isKeyCredential

  • isKeyCredential(credential: any): credential is KeyCredential
  • Checks whether a value is a KeyCredential.

    Parameters

    • credential: any

      The credential being checked.

    Returns credential is KeyCredential

Const isPhoneNumber

  • isPhoneNumber(identifier: Identifier): identifier is PhoneNumber
  • Tests an Identifier to determine whether it implements PhoneNumber.

    Parameters

    • identifier: Identifier

      The assumed PhoneNumber to be tested.

    Returns identifier is PhoneNumber

Const isUnknownIdentifier

  • isUnknownIdentifier(identifier: Identifier): identifier is UnknownIdentifier
  • Tests an Identifier to determine whether it implements UnknownIdentifier.

    Parameters

    • identifier: Identifier

      The assumed UnknownIdentifier to be tested.

    Returns identifier is UnknownIdentifier

Const isValidEndpoint

  • isValidEndpoint(host: string): boolean

Const minutesToMs

  • minutesToMs(minutes: number): number

Const parseClientArguments

  • parseClientArguments(connectionStringOrUrl: string, credentialOrOptions?: any): UrlWithCredential

Const parseConnectionString

Const parseToken

  • parseToken(token: string): AccessToken

Const shaHMAC

  • shaHMAC(secret: string, content: string): Promise<string>
  • shaHMAC(secret: string, content: string): Promise<string>

Const shaHash

  • shaHash(content: string): Promise<string>
  • shaHash(content: string): Promise<string>

Const tryParseConnectionString

Object literals

Const expiredToken

expiredToken: object

expiresOnTimestamp

expiresOnTimestamp: number = -10

token

token: string = ""

Generated using TypeDoc