Enhance API with OIDC support, including login and callback endpoints. Update environment variables for OIDC configuration in .env.example. Add new features to the catalog service for listing software families, Minecraft versions, and deployment regions. Implement server management actions such as kill, delete, and update in the servers module. Integrate feature flags for maintenance mode in server operations. Update pnpm-lock.yaml with new dependencies and versions.
This commit is contained in:
@@ -82,6 +82,24 @@ final class HexaGameCloudApiClient
|
||||
);
|
||||
}
|
||||
|
||||
public function getService(string $externalServiceId): array
|
||||
{
|
||||
return $this->request(
|
||||
'GET',
|
||||
'/api/v1/integrations/whmcs/services/' . rawurlencode($externalServiceId)
|
||||
);
|
||||
}
|
||||
|
||||
public function renewService(string $externalServiceId, array $payload, string $idempotencyKey): array
|
||||
{
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/api/v1/integrations/whmcs/services/' . rawurlencode($externalServiceId) . '/renew',
|
||||
$payload,
|
||||
$idempotencyKey
|
||||
);
|
||||
}
|
||||
|
||||
public function changePackage(string $externalServiceId, array $payload): array
|
||||
{
|
||||
return $this->request(
|
||||
@@ -173,6 +191,46 @@ final class HexaGameCloudApiClient
|
||||
);
|
||||
}
|
||||
|
||||
public function startService(string $externalServiceId): array
|
||||
{
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/api/v1/integrations/whmcs/services/' . rawurlencode($externalServiceId) . '/actions/start',
|
||||
[],
|
||||
'service:start:' . $externalServiceId
|
||||
);
|
||||
}
|
||||
|
||||
public function stopService(string $externalServiceId): array
|
||||
{
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/api/v1/integrations/whmcs/services/' . rawurlencode($externalServiceId) . '/actions/stop',
|
||||
[],
|
||||
'service:stop:' . $externalServiceId
|
||||
);
|
||||
}
|
||||
|
||||
public function restartService(string $externalServiceId): array
|
||||
{
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/api/v1/integrations/whmcs/services/' . rawurlencode($externalServiceId) . '/actions/restart',
|
||||
[],
|
||||
'service:restart:' . $externalServiceId
|
||||
);
|
||||
}
|
||||
|
||||
public function backupService(string $externalServiceId): array
|
||||
{
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/api/v1/integrations/whmcs/services/' . rawurlencode($externalServiceId) . '/actions/backup',
|
||||
[],
|
||||
'service:backup:' . $externalServiceId
|
||||
);
|
||||
}
|
||||
|
||||
private function request(string $method, string $pathWithQuery, array $body = [], ?string $idempotencySuffix = null): array
|
||||
{
|
||||
$pathParts = explode('?', $pathWithQuery, 2);
|
||||
|
||||
Reference in New Issue
Block a user