feat: add --show-freeze-page and --no-show-freeze-page CLI flags

Add CLI support for toggling the show_freeze_page service setting,
which controls whether frozen services display an HTML payment page
or return a JSON error response.

Updated 18 SDK implementations + CLI_SPEC.md documentation.
This commit is contained in:
russell@unturf.com 2026-01-25 04:28:12 -05:00
parent 1b76be5277
commit eeb1dcb3dc
19 changed files with 438 additions and 2 deletions

View file

@ -1545,6 +1545,30 @@ public class UnsandboxAsync {
return makeRequestWithMethod("PATCH", "/services/" + serviceId, creds[0], creds[1], data);
}
/**
* Set show-freeze-page for a service.
*
* <p>When enabled, visitors to a frozen service will see a branded "frozen" page
* instead of an error. This improves UX for services that use unfreeze-on-demand.
*
* @param serviceId Service ID to configure
* @param enabled True to show freeze page, false to hide it
* @param publicKey Optional API key
* @param secretKey Optional API secret
* @return CompletableFuture containing response map with update confirmation
*/
public static CompletableFuture<Map<String, Object>> setShowFreezePage(
String serviceId,
boolean enabled,
String publicKey,
String secretKey
) {
String[] creds = resolveCredentials(publicKey, secretKey);
Map<String, Object> data = new LinkedHashMap<>();
data.put("show_freeze_page", enabled);
return makeRequestWithMethod("PATCH", "/services/" + serviceId, creds[0], creds[1], data);
}
/**
* Get bootstrap logs for a service.
*