Interface for the CallRecording client.

Provides read access to Post Call Recordings through a single getCallRecording method (listing, single fetch, lookup by call session, and metadata — selected by the request type), permanent deletion of a recording, and emits recording lifecycle events received over Mercury.

Hierarchy

  • Eventing<CallRecordingEventTypes>
    • ICallRecording

Implemented by

Methods

  • Reads Post Call Recordings. The GetCallRecordingRequest type selects the operation and constrains the rest of the request body; the resolved response type is inferred per request via RecordingResponseFor:

    • LIST (GET /convergedRecordings) -> RecordingListResponse. The query params come from GetRecordingsOptions; both a from lower bound (derived from days when not provided) and a to upper bound (defaults to now) are always sent, because the API only returns results when the time window is bounded on both ends.
    • DETAIL (GET /convergedRecordings/{recordingId}) -> RecordingResponse.
    • METADATA (GET /convergedRecordings/{recordingId}/metadata) -> RecordingMetadataResponse.
    • BY_CALL_SESSION -> RecordingListResponse. The recording API has no confirmed server-side filter for call session id, so this fetches a list and filters client-side on serviceData.callSessionId. The scan is bounded by the list query, so pass options to widen the time window/status/page when the target session may fall outside the defaults.

    Example

    const list = await callRecording.getCallRecording({type: RecordingRequestType.LIST, options: {max: 30}});
    const one = await callRecording.getCallRecording({type: RecordingRequestType.DETAIL, recordingId});
    const meta = await callRecording.getCallRecording({type: RecordingRequestType.METADATA, recordingId});
    const bySession = await callRecording.getCallRecording({
    type: RecordingRequestType.BY_CALL_SESSION,
    callSessionId,
    options: {days: 30, max: 100},
    });

    Type Parameters

    • T extends GetCallRecordingRequest

    Parameters

    • request: T

      The discriminated read request.

    Returns Promise<RecordingResponseFor<T>>

  • Permanently deletes a single recording.

    Calls DELETE /convergedRecordings/{recordingId}. Per the API, the deleted recording cannot be recovered; when a Compliance Officer deletes another user's recording it is purged from Webex and becomes inaccessible to all parties. Requires the spark-compliance:recordings_write scope on the access token.

    options.reason / options.comment are only required when a Compliance Officer deletes another user's recording and are sent as the request body when provided.

    Example

    await callRecording.deleteRecording(recordingId);
    await callRecording.deleteRecording(recordingId, {reason: 'audit', comment: 'Maintain data privacy'});

    Parameters

    • recordingId: string

      The recording id (id) to delete.

    • Optional options: DeleteRecordingOptions

      Optional reason/comment (Compliance Officer deletions).

    Returns Promise<RecordingDeleteResponse>

Events

  • Type Parameters

    • E extends keyof CallRecordingEventTypes

    Parameters

    • event: E

      Event that is going ot be emitted.

    • Rest ...args: Parameters<CallRecordingEventTypes[E]>

      Parameters that are emitted with the event.

    Returns boolean

  • .

    Type Parameters

    • E extends keyof CallRecordingEventTypes

    Parameters

    • event: E

      Event to listen to.

    • listener: CallRecordingEventTypes[E]

      Callback for event.

    Returns ICallRecording

  • .

    Type Parameters

    • E extends keyof CallRecordingEventTypes

    Parameters

    • event: E

      Event to remove listener on.

    • listener: CallRecordingEventTypes[E]

      Callback for event.

    Returns ICallRecording