@gooddata/sdk-pluggable-application-model 11.28.0-alpha.0 → 11.28.0-alpha.10

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/index.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- export { type EmbeddingMode, type IOrganization, type IOrganizationPermissions, type IPlatformContext, type IPlatformContextV1, type IPluggableApplicationNavigation, PantherTier, isPlatformContextV1, } from "./platformContext.js";
6
+ 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";
7
7
  export { type ILocale } from "@gooddata/sdk-model";
8
- export { type IAppInstance, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type PluggableApplicationMount, } from "./mount.js";
8
+ export { type IAppInstance, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type IPluggableAppTelemetryCallbacks, type ITelemetryEventOptions, type PluggableApplicationMount, type TelemetryChannel, } from "./mount.js";
9
9
  export { type IShellUiModule, type IShellUiMountHandle, type IShellUiMountOptions, type ShellUiMount, } from "./shellUi.js";
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,WAAW,EACX,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GACjC,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GACpB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,+BAA+B,EACpC,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,WAAW,EACX,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GACpB,MAAM,cAAc,CAAC"}
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,oDAAoD;AAEpD;;;;GAIG;AAEH,OAAO,EAOH,WAAW,EACX,mBAAmB,GACtB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,oDAAoD;AAEpD;;;;GAIG;AAEH,OAAO,EAWH,WAAW,EACX,mBAAmB,GACtB,MAAM,sBAAsB,CAAC"}
package/esm/mount.d.ts CHANGED
@@ -13,6 +13,53 @@ export interface IPluggableAppEvent {
13
13
  type: string;
14
14
  payload?: unknown;
15
15
  }
16
+ /**
17
+ * Telemetry channel determines which analytics pipeline receives the event.
18
+ *
19
+ * @remarks
20
+ * - `"standard"` — default channel for general UI events.
21
+ * - `"ai"` — channel for AI-related events that require separate compliance handling.
22
+ *
23
+ * @alpha
24
+ */
25
+ export type TelemetryChannel = "standard" | "ai";
26
+ /**
27
+ * Optional configuration for a telemetry event.
28
+ *
29
+ * @alpha
30
+ */
31
+ export interface ITelemetryEventOptions {
32
+ /**
33
+ * Which analytics channel to route the event to.
34
+ *
35
+ * @defaultValue `"standard"`
36
+ */
37
+ channel?: TelemetryChannel;
38
+ }
39
+ /**
40
+ * Telemetry callbacks provided by the shell to pluggable applications.
41
+ *
42
+ * @remarks
43
+ * Pluggable applications can use these methods to log events through the shell's
44
+ * centralized telemetry system. All events are automatically tagged with the
45
+ * source application ID.
46
+ *
47
+ * @alpha
48
+ */
49
+ export interface IPluggableAppTelemetryCallbacks {
50
+ /**
51
+ * Track a custom telemetry event from the pluggable application.
52
+ *
53
+ * @param eventName - Name of the event.
54
+ * @param data - Optional key-value payload.
55
+ * @param options - Optional event configuration (e.g. channel routing).
56
+ */
57
+ trackEvent: (eventName: string, data?: Record<string, unknown>, options?: ITelemetryEventOptions) => void;
58
+ /** Track a page view within the pluggable application. */
59
+ trackPageView: (page: string) => void;
60
+ /** Track a timing measurement from the pluggable application. */
61
+ trackTiming: (variable: string, label: string, valueMs: number) => void;
62
+ }
16
63
  /**
17
64
  * Options passed by the host into a pluggable application's mount function.
18
65
  *
@@ -47,6 +94,16 @@ export interface IPluggableApplicationMountOptions {
47
94
  * instance.
48
95
  */
49
96
  onEvent?: (e: IPluggableAppEvent) => void;
97
+ /**
98
+ * Telemetry callbacks for the pluggable application to track events through the shell's
99
+ * centralized telemetry system.
100
+ *
101
+ * @remarks
102
+ * This is the preferred way for pluggable applications to emit telemetry. Events are
103
+ * automatically tagged with the source application ID and forwarded to all configured
104
+ * telemetry providers registered in the shell application.
105
+ */
106
+ onTelemetryEvent?: IPluggableAppTelemetryCallbacks;
50
107
  }
51
108
  /**
52
109
  * Handle returned from mount for lifecycle management and host -\> module interaction.
@@ -1 +1 @@
1
- {"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAE/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAC9C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,GAAG,EAAE,gBAAgB,CAAC;IAEtB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAC7C;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACpC,OAAO,EAAE,iCAAiC,KACzC,gCAAgC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,gCAAgC;IAClE,EA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kBAAkB,KAAK,IAAI,CAAC;IAE1C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,+BAA+B,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAC7C;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACpC,OAAO,EAAE,iCAAiC,KACzC,gCAAgC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,gCAAgC;IAClE,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,yBAAyB,CAAC;CACpC"}
@@ -1,4 +1,4 @@
1
- import { type IAnalyticalBackend, type IUserSettings } from "@gooddata/sdk-backend-spi";
1
+ import { type IUserSettings } from "@gooddata/sdk-backend-spi";
2
2
  import { type ApplicationScope, type IEntitlementDescriptor, type ILocale, type ITheme, type IUser, type IWhiteLabeling, type IWorkspacePermissions, type ObjRef } from "@gooddata/sdk-model";
3
3
  /**
4
4
  * Pluggable application embedding mode.
@@ -53,14 +53,69 @@ export interface IPluggableApplicationNavigation {
53
53
  go(to: string): void;
54
54
  openApp(id: string, path?: string): void;
55
55
  }
56
+ /**
57
+ * Cookie / session-based authentication — no explicit credentials required.
58
+ *
59
+ * @alpha
60
+ */
61
+ export interface IContextDeferredAuthCredentials {
62
+ type: "contextDeferred";
63
+ /**
64
+ * Optional external identity-provider identifier for SSO flows.
65
+ * When building a backend with `ContextDeferredAuthProvider`, pass
66
+ * this value to `createNotAuthenticatedHandler` (or equivalent) so
67
+ * the redirect targets the correct IdP login page.
68
+ */
69
+ externalProviderId?: string;
70
+ }
71
+ /**
72
+ * GoodData API-token authentication.
73
+ *
74
+ * @alpha
75
+ */
76
+ export interface IApiTokenAuthCredentials {
77
+ type: "apiToken";
78
+ token: string;
79
+ }
80
+ /**
81
+ * JWT-based authentication.
82
+ *
83
+ * @alpha
84
+ */
85
+ export interface IJwtAuthCredentials {
86
+ type: "jwt";
87
+ token: string;
88
+ secondsBeforeTokenExpirationToCallReminder?: number;
89
+ }
90
+ /**
91
+ * Authentication credentials for building a backend instance.
92
+ *
93
+ * @remarks
94
+ * The shell application determines authentication method and passes the
95
+ * resolved credentials in the platform context. Client applications use
96
+ * them to construct their own backend instance.
97
+ *
98
+ * @alpha
99
+ */
100
+ export type IAuthCredentials = IContextDeferredAuthCredentials | IApiTokenAuthCredentials | IJwtAuthCredentials;
56
101
  /**
57
102
  * Platform context contract version 1.0.
58
103
  *
104
+ * @remarks
105
+ * The shell application populates this context after bootstrapping and
106
+ * passes it to pluggable (client) applications. It intentionally does NOT
107
+ * include a backend instance — client applications create their own using
108
+ * the provided {@link IAuthCredentials} to avoid SDK version desync.
109
+ *
59
110
  * @alpha
60
111
  */
61
112
  export interface IPlatformContextV1 {
62
113
  version: "1.0";
63
- backend: IAnalyticalBackend;
114
+ /**
115
+ * Authentication credentials resolved by the shell.
116
+ * Client applications use these to build their own backend instance.
117
+ */
118
+ auth: IAuthCredentials;
64
119
  user: IUser;
65
120
  organization?: IOrganization;
66
121
  organizationPermissions?: IOrganizationPermissions;
@@ -1 +1 @@
1
- {"version":3,"file":"platformContext.d.ts","sourceRoot":"","sources":["../src/platformContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAA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AAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,kBAAkB,CAOnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"platformContext.js","sourceRoot":"","sources":["../src/platformContext.ts"],"names":[],"mappings":"AAAA,gCAAgC;SA0BpB,WAAW;AALvB;;;;GAIG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,4BAAa,CAAA;AAAC,CAClB,EANY,WAAW,KAAX,WAAW,QAMtB;AA6ED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAiC;IACjF,OAAO,CACH,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,SAAS,IAAI,OAAO;QACnB,OAAiC,CAAC,OAAO,KAAK,KAAK,CACvD,CAAC;AAAA,CACL"}
1
+ {"version":3,"file":"platformContext.js","sourceRoot":"","sources":["../src/platformContext.ts"],"names":[],"mappings":"AAAA,gCAAgC;SA0BpB,WAAW;AALvB;;;;GAIG;AACH,IAAY,WAMX;AAND,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,4BAAa,CAAA;AAAC,CAClB,EANY,WAAW,KAAX,WAAW,QAMtB;AAoJD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAiC;IACjF,OAAO,CACH,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,SAAS,IAAI,OAAO;QACnB,OAAiC,CAAC,OAAO,KAAK,KAAK,CACvD,CAAC;AAAA,CACL"}
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  import { ApplicationScope } from '@gooddata/sdk-model';
8
- import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
9
8
  import { IEntitlementDescriptor } from '@gooddata/sdk-model';
10
9
  import { ILocale } from '@gooddata/sdk-model';
11
10
  import { ITheme } from '@gooddata/sdk-model';
@@ -23,6 +22,16 @@ import { PluggableApplicationRegistryItem } from '@gooddata/sdk-model';
23
22
  */
24
23
  export declare type EmbeddingMode = "none" | "iframe" | "export";
25
24
 
25
+ /**
26
+ * GoodData API-token authentication.
27
+ *
28
+ * @alpha
29
+ */
30
+ export declare interface IApiTokenAuthCredentials {
31
+ type: "apiToken";
32
+ token: string;
33
+ }
34
+
26
35
  /**
27
36
  * Mounted application instance.
28
37
  *
@@ -32,6 +41,45 @@ export declare interface IAppInstance extends IPluggableApplicationMountHandle {
32
41
  id: string;
33
42
  }
34
43
 
44
+ /**
45
+ * Authentication credentials for building a backend instance.
46
+ *
47
+ * @remarks
48
+ * The shell application determines authentication method and passes the
49
+ * resolved credentials in the platform context. Client applications use
50
+ * them to construct their own backend instance.
51
+ *
52
+ * @alpha
53
+ */
54
+ export declare type IAuthCredentials = IContextDeferredAuthCredentials | IApiTokenAuthCredentials | IJwtAuthCredentials;
55
+
56
+ /**
57
+ * Cookie / session-based authentication — no explicit credentials required.
58
+ *
59
+ * @alpha
60
+ */
61
+ export declare interface IContextDeferredAuthCredentials {
62
+ type: "contextDeferred";
63
+ /**
64
+ * Optional external identity-provider identifier for SSO flows.
65
+ * When building a backend with `ContextDeferredAuthProvider`, pass
66
+ * this value to `createNotAuthenticatedHandler` (or equivalent) so
67
+ * the redirect targets the correct IdP login page.
68
+ */
69
+ externalProviderId?: string;
70
+ }
71
+
72
+ /**
73
+ * JWT-based authentication.
74
+ *
75
+ * @alpha
76
+ */
77
+ export declare interface IJwtAuthCredentials {
78
+ type: "jwt";
79
+ token: string;
80
+ secondsBeforeTokenExpirationToCallReminder?: number;
81
+ }
82
+
35
83
  export { ILocale }
36
84
 
37
85
  /**
@@ -72,11 +120,21 @@ export declare type IPlatformContext = IPlatformContextV1;
72
120
  /**
73
121
  * Platform context contract version 1.0.
74
122
  *
123
+ * @remarks
124
+ * The shell application populates this context after bootstrapping and
125
+ * passes it to pluggable (client) applications. It intentionally does NOT
126
+ * include a backend instance — client applications create their own using
127
+ * the provided {@link IAuthCredentials} to avoid SDK version desync.
128
+ *
75
129
  * @alpha
76
130
  */
77
131
  export declare interface IPlatformContextV1 {
78
132
  version: "1.0";
79
- backend: IAnalyticalBackend;
133
+ /**
134
+ * Authentication credentials resolved by the shell.
135
+ * Client applications use these to build their own backend instance.
136
+ */
137
+ auth: IAuthCredentials;
80
138
  user: IUser;
81
139
  organization?: IOrganization;
82
140
  organizationPermissions?: IOrganizationPermissions;
@@ -169,6 +227,16 @@ export declare interface IPluggableApplicationMountOptions {
169
227
  * instance.
170
228
  */
171
229
  onEvent?: (e: IPluggableAppEvent) => void;
230
+ /**
231
+ * Telemetry callbacks for the pluggable application to track events through the shell's
232
+ * centralized telemetry system.
233
+ *
234
+ * @remarks
235
+ * This is the preferred way for pluggable applications to emit telemetry. Events are
236
+ * automatically tagged with the source application ID and forwarded to all configured
237
+ * telemetry providers registered in the shell application.
238
+ */
239
+ onTelemetryEvent?: IPluggableAppTelemetryCallbacks;
172
240
  }
173
241
 
174
242
  /**
@@ -181,6 +249,31 @@ export declare interface IPluggableApplicationNavigation {
181
249
  openApp(id: string, path?: string): void;
182
250
  }
183
251
 
252
+ /**
253
+ * Telemetry callbacks provided by the shell to pluggable applications.
254
+ *
255
+ * @remarks
256
+ * Pluggable applications can use these methods to log events through the shell's
257
+ * centralized telemetry system. All events are automatically tagged with the
258
+ * source application ID.
259
+ *
260
+ * @alpha
261
+ */
262
+ export declare interface IPluggableAppTelemetryCallbacks {
263
+ /**
264
+ * Track a custom telemetry event from the pluggable application.
265
+ *
266
+ * @param eventName - Name of the event.
267
+ * @param data - Optional key-value payload.
268
+ * @param options - Optional event configuration (e.g. channel routing).
269
+ */
270
+ trackEvent: (eventName: string, data?: Record<string, unknown>, options?: ITelemetryEventOptions) => void;
271
+ /** Track a page view within the pluggable application. */
272
+ trackPageView: (page: string) => void;
273
+ /** Track a timing measurement from the pluggable application. */
274
+ trackTiming: (variable: string, label: string, valueMs: number) => void;
275
+ }
276
+
184
277
  /**
185
278
  * Shell UI module contract.
186
279
  *
@@ -290,6 +383,20 @@ export declare interface IShellUiMountOptions {
290
383
  */
291
384
  export declare function isPlatformContextV1(context: unknown): context is IPlatformContextV1;
292
385
 
386
+ /**
387
+ * Optional configuration for a telemetry event.
388
+ *
389
+ * @alpha
390
+ */
391
+ export declare interface ITelemetryEventOptions {
392
+ /**
393
+ * Which analytics channel to route the event to.
394
+ *
395
+ * @defaultValue `"standard"`
396
+ */
397
+ channel?: TelemetryChannel;
398
+ }
399
+
293
400
  /**
294
401
  * Panther tier.
295
402
  *
@@ -325,4 +432,15 @@ export declare type PluggableApplicationMount = (options: IPluggableApplicationM
325
432
  */
326
433
  export declare type ShellUiMount = (options: IShellUiMountOptions) => IShellUiMountHandle;
327
434
 
435
+ /**
436
+ * Telemetry channel determines which analytics pipeline receives the event.
437
+ *
438
+ * @remarks
439
+ * - `"standard"` — default channel for general UI events.
440
+ * - `"ai"` — channel for AI-related events that require separate compliance handling.
441
+ *
442
+ * @alpha
443
+ */
444
+ export declare type TelemetryChannel = "standard" | "ai";
445
+
328
446
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-pluggable-application-model",
3
- "version": "11.28.0-alpha.0",
3
+ "version": "11.28.0-alpha.10",
4
4
  "description": "GoodData SDK model contracts for pluggable applications",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -23,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "ts-invariant": "0.10.3",
25
25
  "tslib": "2.8.1",
26
- "@gooddata/sdk-backend-spi": "11.28.0-alpha.0",
27
- "@gooddata/sdk-model": "11.28.0-alpha.0"
26
+ "@gooddata/sdk-backend-spi": "11.28.0-alpha.10",
27
+ "@gooddata/sdk-model": "11.28.0-alpha.10"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@microsoft/api-documenter": "^7.17.0",
@@ -48,8 +48,8 @@
48
48
  "oxlint-tsgolint": "0.11.4",
49
49
  "typescript": "5.9.3",
50
50
  "vitest": "4.1.0",
51
- "@gooddata/eslint-config": "11.28.0-alpha.0",
52
- "@gooddata/oxlint-config": "11.28.0-alpha.0"
51
+ "@gooddata/eslint-config": "11.28.0-alpha.10",
52
+ "@gooddata/oxlint-config": "11.28.0-alpha.10"
53
53
  },
54
54
  "scripts": {
55
55
  "_phase:build": "npm run build",