<?php

namespace bird\classes;

require_once WD . '/modules/bird/interfaces/bird_voice_recordings_client_i.php';
require_once WD . '/modules/bird/classes/bird_api_client.php';

use bird\interfaces\bird_voice_recordings_client_i;

class bird_voice_recordings_client extends bird_api_client implements bird_voice_recordings_client_i
{
    public function createVoiceCallRecordingSession(string $workspaceId, string $channelId, string $callId, array $payload): array|object|null
    {
        return $this->post($this->birdVoiceCallRecordingsPath($workspaceId, $channelId, $callId), $payload);
    }

    public function listVoiceCallRecordings(string $workspaceId, string $channelId, string $callId, array $query = []): array|object|null
    {
        return $this->get($this->birdVoiceCallRecordingsPath($workspaceId, $channelId, $callId), $query);
    }

    public function getVoiceCallRecording(string $workspaceId, string $channelId, string $callId, string $recordingId): array|object|null
    {
        return $this->get($this->birdVoiceCallRecordingPath($workspaceId, $channelId, $callId, $recordingId));
    }

    public function updateVoiceCallRecording(string $workspaceId, string $channelId, string $callId, string $recordingId, array $payload): array|object|null
    {
        return $this->patch($this->birdVoiceCallRecordingPath($workspaceId, $channelId, $callId, $recordingId), $payload);
    }
}
