import OpenTok from 'opentok'; import { VonageAzureTargetOptions, VonageConfig, VonageMeetingOptions, VonageMeetingResponse, VonageS3TargetOptions, VonageSessionOptions, VonageSessionWebhookPayload, VonageVideoChat } from '.'; import { SessionAttendees, VideoChatFeatures } from '../..'; import { SessionAttendeesRepository } from '../../repositories'; import { ArchiveResponse, ArchiveResponseList, SessionResponse } from '../../types'; export declare class VonageService implements VonageVideoChat { private readonly vonageConfig; private readonly sessionAttendeesRepository; VonageClient: OpenTok; constructor(vonageConfig: VonageConfig, sessionAttendeesRepository: SessionAttendeesRepository); getMeetingLink(meetingOptions: VonageMeetingOptions): Promise; getToken(sessionId: string, options: VonageSessionOptions): Promise; getFeatures(): VideoChatFeatures; getArchives(archiveId: string | null): Promise; deleteArchive(archiveId: string): Promise; /** * The function `setUploadTarget` asynchronously sets the upload target for storage using Vonage S3 * or Azure options. * @param {VonageS3TargetOptions | VonageAzureTargetOptions} storageConfig - The `storageConfig` * parameter in the `setUploadTarget` function can be of type `VonageS3TargetOptions` or * `VonageAzureTargetOptions`. These types likely contain configuration options specific to storing * uploaded files in either an S3 bucket (for Amazon S3) or */ setUploadTarget(storageConfig: VonageS3TargetOptions | VonageAzureTargetOptions): Promise; /** * The function `_createVonageJwtToken` generates a JWT token using Vonage API key and secret with a * specified time-to-live (TTL) of 200 seconds. * @returns A Vonage JWT token is being returned. */ private _createVonageJwtToken; /** * The function `_buildStorageCredentials` determines the type of storage credentials based on the * provided storage configuration. * @param {VonageS3TargetOptions | VonageAzureTargetOptions} storageConfig - The * `_buildStorageCredentials` function takes in a `storageConfig` parameter of type * `VonageS3TargetOptions` or `VonageAzureTargetOptions`. It then checks the `name` property of the * `storageConfig` object to determine the type of external storage (AWS S * @returns The `_buildStorageCredentials` method returns an object with two properties: `type` and * `credentials`. The `type` property is a string, and the `credentials` property is a record * containing key-value pairs of any type. The specific values of these properties are determined * based on the `storageConfig` parameter passed to the method. */ private _buildStorageCredentials; /** * The function `_getAwsCredentials` retrieves AWS S3 credentials for setting a Vonage upload target. * @param {VonageS3TargetOptions} config - The `_getAwsCredentials` function takes in a * `VonageS3TargetOptions` object as the `config` parameter. This object typically contains * properties such as `bucket` and `endpoint` for configuring an AWS S3 bucket. * @returns an object with a `type` property set to 'S3' and a `credentials` property containing the * AWS access key, secret key, S3 bucket name, and endpoint. */ private _getAwsCredentials; /** * The function `_getAzureCredentials` retrieves Azure credentials for setting Vonage upload target. * @param {VonageAzureTargetOptions} config - The `config` parameter in the `_getAzureCredentials` * function refers to an object of type `VonageAzureTargetOptions`. This object likely contains * properties such as `accountName` and `domain` that are needed to retrieve Azure credentials for * setting up a Vonage upload target. * @returns an object with a `type` property set to 'Azure' and a `credentials` property containing * the `accountName`, `accountKey`, `container`, and `domain` values. */ private _getAzureCredentials; checkWebhookPayload(webhookPayload: VonageSessionWebhookPayload): Promise; /** * The _handleWebhookEvent function processes different Vonage session webhook events by updating * attendee details accordingly. * @param event - The `event` parameter is of type `VonageEnums.SessionWebhookEvents` and represents * the type of webhook event that occurred. * @param {VonageSessionWebhookPayload} webhookPayload - The `webhookPayload` parameter in the * `_handleWebhookEvent` function is of type `VonageSessionWebhookPayload`. It likely contains data * related to the webhook event that triggered the function, such as information about the session, * attendees, or streams involved in the event. You can * @param {SessionAttendees} sessionAttendeeDetail - The `sessionAttendeeDetail` parameter in the * `_handleWebhookEvent` function represents details about a session attendee. It likely includes * information such as the attendee's ID, name, status, and any other relevant details related to * their participation in a session. This parameter is used within the function to * @param updatedAttendee - The `updatedAttendee` parameter in the `_handleWebhookEvent` function is * a partial object of type `SessionAttendees`. It is used to store the updated information of an * attendee during webhook event handling. Depending on the event type, different properties of the * `updatedAttendee` object are */ private _handleWebhookEvent; processStreamDestroyedEvent(webhookPayload: VonageSessionWebhookPayload, sessionAttendeeDetail: SessionAttendees, updatedAttendee: Partial): Promise; }