Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/communication-common

Package version

Index

Type aliases

CommunicationIdentifier

Identifies a communication participant.

CommunicationIdentifierKind

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

TokenCredential

TokenCredential: Pick<AzureCommunicationTokenCredential, "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 addRawIdIfExisting

  • addRawIdIfExisting<T>(identifier: T, rawId: string | undefined): T & { rawId?: undefined | string }
  • Type parameters

    • T

    Parameters

    • identifier: T
    • rawId: string | undefined

    Returns T & { rawId?: undefined | string }

Const assertMaximumOneNestedModel

  • assertMaximumOneNestedModel(identifier: SerializedCommunicationIdentifier): void

Const assertNotNullOrUndefined

  • assertNotNullOrUndefined<T, P, Q>(obj: T, prop: Q): Required<Required<T>[P]>[Q]
  • Type parameters

    • T: Record<string, unknown>

    • P: keyof T

    • Q: keyof T[P]

    Parameters

    • obj: T
    • prop: Q

    Returns Required<Required<T>[P]>[Q]

Const assertValidEndpoint

  • assertValidEndpoint(host: string): void

encodeBase64

  • encodeBase64(value: ArrayBuffer): string

Const encodeUTF8

  • encodeUTF8(str: string): Uint8Array

encodeUTF8fromBase64

  • encodeUTF8fromBase64(str: string): Uint8Array

Const getCrypto

  • getCrypto(): SubtleCrypto

Const getIdentifierKind

Const isCommunicationUserIdentifier

  • Tests an Identifier to determine whether it implements CommunicationUserIdentifier.

    Parameters

    Returns identifier is CommunicationUserIdentifier

Const isKeyCredential

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

    Parameters

    • credential: unknown

      The credential being checked.

    Returns credential is KeyCredential

Const isMicrosoftTeamsUserIdentifier

  • Tests an Identifier to determine whether it implements MicrosoftTeamsUserIdentifier.

    Parameters

    Returns identifier is MicrosoftTeamsUserIdentifier

Const isPhoneNumberIdentifier

  • Tests an Identifier to determine whether it implements PhoneNumberIdentifier.

    Parameters

    Returns identifier is PhoneNumberIdentifier

Const isUnknownIdentifier

  • Tests an Identifier to determine whether it implements UnknownIdentifier.

    Parameters

    Returns identifier is UnknownIdentifier

Const isValidEndpoint

  • isValidEndpoint(host: string): boolean

Const minutesToMs

  • minutesToMs(minutes: number): number

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

  • tryParseConnectionString(s: string): EndpointCredential | undefined

Object literals

Const expiredToken

expiredToken: object

expiresOnTimestamp

expiresOnTimestamp: number = -10

token

token: string = ""

Generated using TypeDoc