<?php

namespace interfaces;

interface wordpress_bookings_remote_i
{
    /**
     * Get booking by ID from the remote API
     * @param int $id
     * @return array
     */
    public function get_booking(int $id): array;

    /**
     * Parse booking data, and return it as an array
     * @param array|int $booking
     * @return array|null The parsed booking data, or null if the booking was not found
     */
    public function parse_booking(array|int $booking): array|null;

    /**
     * Get all wash IDs from the remote API
     * @return array
     */
    public function get_all_wash_ids(): array;

    /**
     * Get all bookings from the remote API
     * @return array
     */
    public function get_all_bookings(): array;

    /**
     * Get the last wash ID from the remote API
     * @return int
     */
    public function get_last_wash_id(): int;

    /**
     * Parse multiple bookings
     * @param array $bookings
     * @return array
     */
    public function parse_bookings(array $bookings): array;

    /**
     * Check if a booking has the expected keys
     * @param array $booking
     * @param array $expected_keys
     * @return bool
     */
    public function check_booking_has_expected_keys(array $booking, array $expected_keys): bool;

    /**
     * Check if a booking has a wash certificate
     * @param array $booking
     */
    public function check_booking_has_wash_certificate(array $booking): bool;

    /**
     * Get the booking cache
     * @return array
     */
    public function get_booking_cache(): array;
}