<?php

declare(strict_types=1);

namespace App\Services\Provisioning;

use App\Models\Service;
use Laravel\Cashier\Subscription;

interface ProvisioningServiceInterface
{
    /**
     * Provision a new service for a subscription.
     */
    public function provision(Subscription $subscription): Service;

    /**
     * Suspend an active service.
     */
    public function suspend(Service $service): bool;

    /**
     * Unsuspend a previously suspended service.
     */
    public function unsuspend(Service $service): bool;

    /**
     * Terminate and permanently remove a service.
     */
    public function terminate(Service $service): bool;

    /**
     * Get the current status of a service from the platform.
     *
     * @return array{status: string, ip_address?: string, hostname?: string, platform_data?: array<string, mixed>}
     */
    public function getStatus(Service $service): array;

    /**
     * Get the access credentials for a service.
     *
     * @return array{username?: string, password?: string, url?: string, additional?: array<string, mixed>}
     */
    public function getCredentials(Service $service): array;
}
