@gooddata/sdk-pluggable-application-model 11.36.0 → 11.37.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/__version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  // DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
3
3
  /** @alpha */
4
- export const LIB_VERSION = "11.36.0";
4
+ export const LIB_VERSION = "11.37.0-alpha.1";
5
5
  /** @alpha */
6
6
  export const LIB_DESCRIPTION = "GoodData SDK model contracts for pluggable applications";
7
7
  /** @alpha */
package/esm/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export { DefaultApplicationId } from "./defaultPlatformApplications.js";
7
7
  export { LIB_VERSION, LIB_DESCRIPTION, LIB_NAME } from "./__version.js";
8
- export { type EmbeddingMode, type IApiTokenAuthCredentials, type IAuthCredentials, type IContextDeferredAuthCredentials, type IJwtAuthCredentials, type IOrganization, type IOrganizationPermissions, type IPlatformContext, type IPlatformContextV1, type IPluggableApplicationNavigation, PantherTier, isPlatformContextV1, } from "./platformContext.js";
8
+ export { type EmbeddingMode, type IApiTokenAuthCredentials, type IAuthCredentials, type IContextDeferredAuthCredentials, type IEffectiveSettings, type IJwtAuthCredentials, type IOrganization, type IOrganizationPermissions, type IPlatformContext, type IPlatformContextV1, type IPluggableApplicationNavigation, PantherTier, isPlatformContextV1, isWorkspaceScopedSettings, } from "./platformContext.js";
9
9
  export { type ILocale } from "@gooddata/sdk-model";
10
10
  export { type IAppHeaderOptions, type IAppInstance, type KnownPluggableAppEventTypeName, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type IPluggableAppTelemetryCallbacks, type IReloadPlatformContextRequestedEvent, type ITelemetryEventOptions, isReloadPlatformContextRequestedEvent, type PluggableApplicationMount, PluggableAppEventType, type PluggableAppEventTypeName, reloadPlatformContextRequested, type TelemetryChannel, } from "./mount.js";
11
11
  export { type IHostUiModule, type IHostUiMountHandle, type IHostUiMountOptions, type IHostUiNotification, type INewDeploymentAvailableHostUiNotification, type HostUiMount, } from "./hostUi.js";
package/esm/index.js CHANGED
@@ -7,5 +7,5 @@
7
7
  */
8
8
  export { DefaultApplicationId } from "./defaultPlatformApplications.js";
9
9
  export { LIB_VERSION, LIB_DESCRIPTION, LIB_NAME } from "./__version.js";
10
- export { PantherTier, isPlatformContextV1, } from "./platformContext.js";
10
+ export { PantherTier, isPlatformContextV1, isWorkspaceScopedSettings, } from "./platformContext.js";
11
11
  export { isReloadPlatformContextRequestedEvent, PluggableAppEventType, reloadPlatformContextRequested, } from "./mount.js";
@@ -97,6 +97,30 @@ export interface IJwtAuthCredentials {
97
97
  * @alpha
98
98
  */
99
99
  export type IAuthCredentials = IContextDeferredAuthCredentials | IApiTokenAuthCredentials | IJwtAuthCredentials;
100
+ /**
101
+ * Effective settings for the active application scope.
102
+ *
103
+ * @remarks
104
+ * - On workspace-scoped routes this is `IUserWorkspaceSettings`, which the backend
105
+ * produces from the org → workspace → user cascade.
106
+ * - On organization-scoped routes this is `IUserSettings`, which the backend
107
+ * produces from the org → user cascade.
108
+ *
109
+ * Prefer reading {@link IPlatformContextV1.settings} for feature flags, locale, theme keys
110
+ * and other values whose source can be overridden at the workspace level.
111
+ *
112
+ * Read the raw {@link IPlatformContextV1.userSettings} or {@link IPlatformContextV1.workspaceSettings}
113
+ * only when you specifically need a field from one shape (e.g. the workspace identifier).
114
+ *
115
+ * @alpha
116
+ */
117
+ export type IEffectiveSettings = IUserSettings | IUserWorkspaceSettings;
118
+ /**
119
+ * Narrows {@link IEffectiveSettings} to the workspace-scoped shape.
120
+ *
121
+ * @alpha
122
+ */
123
+ export declare function isWorkspaceScopedSettings(settings: IEffectiveSettings): settings is IUserWorkspaceSettings;
100
124
  /**
101
125
  * Platform context contract version 1.0.
102
126
  *
@@ -120,19 +144,36 @@ export interface IPlatformContextV1 {
120
144
  organizationPermissions?: IOrganizationPermissions;
121
145
  workspacePermissions?: IWorkspacePermissions;
122
146
  entitlements?: IEntitlementDescriptor[];
147
+ /**
148
+ * Raw user-level settings (org → user cascade).
149
+ *
150
+ * @remarks
151
+ * Prefer {@link IPlatformContextV1.settings} for reads that may be overridden at
152
+ * the workspace level (feature flags, locale, theme). Use this raw view only
153
+ * when you specifically need a user-scoped field such as `userId`.
154
+ */
123
155
  userSettings: IUserSettings;
124
156
  /**
125
- * Effective workspace-scoped settings for the current user.
157
+ * Raw workspace-scoped settings for the current user (org → workspace → user cascade).
126
158
  *
127
159
  * @remarks
128
- * Populated by the host when the active route is workspace-scoped.
129
- * Merges workspace-level overrides with user-level defaults — use this
130
- * for workspace feature flags (e.g. `enableAIKnowledge`) instead of
131
- * `userSettings`, which only contains user-level values.
160
+ * Populated by the host when the active route is workspace-scoped, `undefined` otherwise.
132
161
  *
133
- * `undefined` when no workspace is active (organization-scoped routes).
162
+ * Prefer {@link IPlatformContextV1.settings} for general reads. Use this raw view only
163
+ * when you specifically need a workspace-scoped field (e.g. the `workspace` identifier).
134
164
  */
135
165
  workspaceSettings?: IUserWorkspaceSettings;
166
+ /**
167
+ * Effective settings for the active application scope.
168
+ *
169
+ * @remarks
170
+ * - Workspace-scoped routes: equals `workspaceSettings` (org → workspace → user cascade).
171
+ * - Organization-scoped routes: equals `userSettings` (org → user cascade).
172
+ *
173
+ * This is the canonical read path for feature flags, locale, theme, and other
174
+ * values whose source can be overridden at the workspace level.
175
+ */
176
+ settings: IEffectiveSettings;
136
177
  whiteLabeling: IWhiteLabeling | undefined;
137
178
  preferredLocale?: ILocale;
138
179
  pantherTier?: PantherTier;
@@ -13,6 +13,14 @@ var PantherTier;
13
13
  PantherTier["LABS"] = "LABS";
14
14
  PantherTier["DEMO"] = "DEMO";
15
15
  })(PantherTier || (PantherTier = {}));
16
+ /**
17
+ * Narrows {@link IEffectiveSettings} to the workspace-scoped shape.
18
+ *
19
+ * @alpha
20
+ */
21
+ export function isWorkspaceScopedSettings(settings) {
22
+ return typeof settings.workspace === "string";
23
+ }
16
24
  /**
17
25
  * Type guard for {@link IPlatformContextV1}.
18
26
  *
@@ -136,6 +136,25 @@ export declare interface IContextDeferredAuthCredentials {
136
136
  externalProviderId?: string;
137
137
  }
138
138
 
139
+ /**
140
+ * Effective settings for the active application scope.
141
+ *
142
+ * @remarks
143
+ * - On workspace-scoped routes this is `IUserWorkspaceSettings`, which the backend
144
+ * produces from the org → workspace → user cascade.
145
+ * - On organization-scoped routes this is `IUserSettings`, which the backend
146
+ * produces from the org → user cascade.
147
+ *
148
+ * Prefer reading {@link IPlatformContextV1.settings} for feature flags, locale, theme keys
149
+ * and other values whose source can be overridden at the workspace level.
150
+ *
151
+ * Read the raw {@link IPlatformContextV1.userSettings} or {@link IPlatformContextV1.workspaceSettings}
152
+ * only when you specifically need a field from one shape (e.g. the workspace identifier).
153
+ *
154
+ * @alpha
155
+ */
156
+ export declare type IEffectiveSettings = IUserSettings | IUserWorkspaceSettings;
157
+
139
158
  /**
140
159
  * Host UI module contract.
141
160
  *
@@ -365,19 +384,36 @@ export declare interface IPlatformContextV1 {
365
384
  organizationPermissions?: IOrganizationPermissions;
366
385
  workspacePermissions?: IWorkspacePermissions;
367
386
  entitlements?: IEntitlementDescriptor[];
387
+ /**
388
+ * Raw user-level settings (org → user cascade).
389
+ *
390
+ * @remarks
391
+ * Prefer {@link IPlatformContextV1.settings} for reads that may be overridden at
392
+ * the workspace level (feature flags, locale, theme). Use this raw view only
393
+ * when you specifically need a user-scoped field such as `userId`.
394
+ */
368
395
  userSettings: IUserSettings;
369
396
  /**
370
- * Effective workspace-scoped settings for the current user.
397
+ * Raw workspace-scoped settings for the current user (org → workspace → user cascade).
371
398
  *
372
399
  * @remarks
373
- * Populated by the host when the active route is workspace-scoped.
374
- * Merges workspace-level overrides with user-level defaults — use this
375
- * for workspace feature flags (e.g. `enableAIKnowledge`) instead of
376
- * `userSettings`, which only contains user-level values.
400
+ * Populated by the host when the active route is workspace-scoped, `undefined` otherwise.
377
401
  *
378
- * `undefined` when no workspace is active (organization-scoped routes).
402
+ * Prefer {@link IPlatformContextV1.settings} for general reads. Use this raw view only
403
+ * when you specifically need a workspace-scoped field (e.g. the `workspace` identifier).
379
404
  */
380
405
  workspaceSettings?: IUserWorkspaceSettings;
406
+ /**
407
+ * Effective settings for the active application scope.
408
+ *
409
+ * @remarks
410
+ * - Workspace-scoped routes: equals `workspaceSettings` (org → workspace → user cascade).
411
+ * - Organization-scoped routes: equals `userSettings` (org → user cascade).
412
+ *
413
+ * This is the canonical read path for feature flags, locale, theme, and other
414
+ * values whose source can be overridden at the workspace level.
415
+ */
416
+ settings: IEffectiveSettings;
381
417
  whiteLabeling: IWhiteLabeling | undefined;
382
418
  preferredLocale?: ILocale;
383
419
  pantherTier?: PantherTier;
@@ -546,6 +582,13 @@ export declare function isPlatformContextV1(context: unknown): context is IPlatf
546
582
  */
547
583
  export declare function isReloadPlatformContextRequestedEvent(obj: unknown): obj is IReloadPlatformContextRequestedEvent;
548
584
 
585
+ /**
586
+ * Narrows {@link IEffectiveSettings} to the workspace-scoped shape.
587
+ *
588
+ * @alpha
589
+ */
590
+ export declare function isWorkspaceScopedSettings(settings: IEffectiveSettings): settings is IUserWorkspaceSettings;
591
+
549
592
  /**
550
593
  * Optional configuration for a telemetry event.
551
594
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-pluggable-application-model",
3
- "version": "11.36.0",
3
+ "version": "11.37.0-alpha.1",
4
4
  "description": "GoodData SDK model contracts for pluggable applications",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "ts-invariant": "0.10.3",
25
25
  "tslib": "2.8.1",
26
- "@gooddata/sdk-model": "11.36.0"
26
+ "@gooddata/sdk-model": "11.37.0-alpha.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@microsoft/api-documenter": "^7.17.0",
@@ -47,8 +47,8 @@
47
47
  "oxlint-tsgolint": "0.11.4",
48
48
  "typescript": "5.9.3",
49
49
  "vitest": "4.1.0",
50
- "@gooddata/oxlint-config": "11.36.0",
51
- "@gooddata/eslint-config": "11.36.0"
50
+ "@gooddata/oxlint-config": "11.37.0-alpha.1",
51
+ "@gooddata/eslint-config": "11.37.0-alpha.1"
52
52
  },
53
53
  "scripts": {
54
54
  "_phase:build": "npm run build",