Skip to content

Commit 7bf414f

Browse files
Auto Implementerclaude
andcommitted
feat(gooddata-sdk): [AUTO] add exclude_user_settings param to workspace settings resolution
Expose the new excludeUserSettings query parameter (added in gdc-nas PR #20044) through the SDK wrapper methods resolve_all_workspace_settings and resolve_workspace_settings. Both methods now accept exclude_user_settings: bool = False and forward it to the underlying API client calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ab63c6a commit 7bf414f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace

packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,14 @@ def list_workspace_settings(self, workspace_id: str) -> list[CatalogWorkspaceSet
190190
workspace_settings = load_all_entities(get_workspace_settings).data
191191
return [CatalogWorkspaceSetting.from_api(ws) for ws in workspace_settings]
192192

193-
def resolve_all_workspace_settings(self, workspace_id: str) -> dict:
193+
def resolve_all_workspace_settings(self, workspace_id: str, exclude_user_settings: bool = False) -> dict:
194194
"""
195195
Resolves values for all settings in a workspace by current user, workspace, organization, or default settings
196196
and return them as a dictionary. Proper parsing is up to the caller.
197197
TODO: long-term we should return a proper entity object.
198198
199199
:param workspace_id: Workspace ID
200+
:param exclude_user_settings: If True, user-level settings are skipped during resolution
200201
:return: Dict of settings
201202
"""
202203
# note: in case some settings were recently added and the API client was not regenerated it can fail on
@@ -205,26 +206,31 @@ def resolve_all_workspace_settings(self, workspace_id: str) -> dict:
205206
setting.to_dict()
206207
for setting in self._client.actions_api.workspace_resolve_all_settings(
207208
workspace_id,
209+
exclude_user_settings=exclude_user_settings,
208210
_check_return_type=False,
209211
)
210212
]
211213
return {setting["type"]: setting for setting in resolved_workspace_settings}
212214

213-
def resolve_workspace_settings(self, workspace_id: str, settings: list) -> dict:
215+
def resolve_workspace_settings(
216+
self, workspace_id: str, settings: list, exclude_user_settings: bool = False
217+
) -> dict:
214218
"""
215219
Resolves values for given settings in a workspace by current user, workspace, organization, or default settings
216220
and return them as a dictionary. Proper parsing is up to the caller.
217221
TODO: long-term we should return a proper entity object.
218222
219223
:param workspace_id: Workspace ID
220224
:param settings: List of settings to resolve
225+
:param exclude_user_settings: If True, user-level settings are skipped during resolution
221226
:return: Dict of settings
222227
"""
223228
resolved_workspace_settings = [
224229
setting.to_dict()
225230
for setting in self._client.actions_api.workspace_resolve_settings(
226231
workspace_id,
227232
ResolveSettingsRequest(settings=settings),
233+
exclude_user_settings=exclude_user_settings,
228234
_check_return_type=False,
229235
)
230236
]

0 commit comments

Comments
 (0)