Files
2026-10-12 05:18:58 -04:00

22 lines
726 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Contracts\Api;
use Pterodactyl\Models\ApiKey;
interface CreatesApiKeys
{
/**
* The input and the permissions are validated here, and each allowed IP must be an IP
* address or a CIDR range. The permissions only apply to application keys: each is
* AdminAcl::NONE or AdminAcl::READ and AdminAcl::WRITE combined, and a resource left out
* gets AdminAcl::NONE.
*
* @param array<string, mixed> $input memo and user_id, and optionally allowed_ips
* @param array<string, mixed> $permissions the r_* column of any AdminAcl resource
*/
public function create(int $keyType, array $input, array $permissions = []): ApiKey;
}