feat(14-08): add cache settings API/store wiring for Settings integration
- Fix getCacheSettings/updateCacheSettings URLs to use /api/cloud/analysis/cache and /api/cloud/analysis/cache/settings (Rule 1: wrong URLs per Plan 14-03 backend) - Add loadCacheSettings action: hydrates tierCapBytes, cacheUsage, cacheLimit, detailedAnalysisProgress, failureBehavior from server without clearing on error - Add tierCapBytes, cacheUsage, cacheSettingsLoading, cacheSettingsError state - updateCacheSettings merges full CacheStatusOut response into local state
This commit is contained in:
@@ -354,19 +354,28 @@ export function retryAnalysisItem(jobId, itemId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current user cache settings.
|
||||
* Get the current user cache status and analysis settings.
|
||||
*
|
||||
* Returns { cloud_cache_limit_bytes, ... }
|
||||
* Returns CacheStatusOut: { entry_count, total_bytes, cache_limit_bytes,
|
||||
* tier_cap_bytes, analysis_progress_detail, analysis_failure_behavior }
|
||||
*
|
||||
* Never includes object_key, credentials_enc, or raw provider URLs (T-14-02/T-14-08).
|
||||
*/
|
||||
export function getCacheSettings() {
|
||||
return request('/api/users/me/settings')
|
||||
return request('/api/cloud/analysis/cache')
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the current user cache settings.
|
||||
* Update the current user analysis settings and/or cache limit.
|
||||
*
|
||||
* @param {{ cloud_cache_limit_bytes?: number }} params
|
||||
* PATCH /api/cloud/analysis/cache/settings
|
||||
* Body fields (all optional): cloud_cache_limit_bytes, analysis_progress_detail,
|
||||
* analysis_failure_behavior.
|
||||
* Returns fresh CacheStatusOut after update.
|
||||
*
|
||||
* @param {{ cloud_cache_limit_bytes?: number, analysis_progress_detail?: boolean,
|
||||
* analysis_failure_behavior?: string }} params
|
||||
*/
|
||||
export function updateCacheSettings(params) {
|
||||
return jsonRequest('/api/users/me/settings', 'PATCH', params)
|
||||
return jsonRequest('/api/cloud/analysis/cache/settings', 'PATCH', params)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user