feat(scripts/data-resources): merge tree + add parent_path filter
- Backend: GET /api/v1/data-resources accepts parent_path; LIKE
'{ws_id}/%/{escaped}/%' AND NOT LIKE '{ws_id}/%/{escaped}/%/%' on
StorageObjects.object_key (workspace-wide, escapes _ and %, mirrors
list_scripts parent_path semantics). 13 new tests in
test_resources.py (helper unit / SQL compile / SQLite behavioral).
- Frontend: listResources gains parentPath arg, propagated through
WorkspaceBoundApi + AuthContext binding. WorkspaceTreeGroup title
count and ScriptExplorer header count now include dataResources.
memberScriptGroups backfills data-only owners so users with only
data resources still render a group. loadDataResources accepts an
optional parentPath, default empty preserves prior behavior.
This commit is contained in:
@@ -223,7 +223,8 @@ export function useApi(): WorkspaceBoundApi {
|
||||
return useMemo<WorkspaceBoundApi>(() => ({
|
||||
listScripts: (parentPath) => rawApi.listScripts(workspaceId, parentPath),
|
||||
countScripts: () => rawApi.countScripts(workspaceId),
|
||||
listResources: (opts) => rawApi.listResources(workspaceId, opts),
|
||||
listResources: (parentPath, opts) =>
|
||||
rawApi.listResources(workspaceId, parentPath, opts),
|
||||
createScript: (input) => rawApi.createScript(workspaceId, input),
|
||||
uploadScript: (file, parentPath, visibility) =>
|
||||
rawApi.uploadScript(workspaceId, file, parentPath, visibility),
|
||||
|
||||
Reference in New Issue
Block a user