@gooddata/sdk-pluggable-application-model 11.41.0-alpha.5 → 11.42.0-alpha.0
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 +1 -1
- package/esm/hostUi.d.ts +2 -2
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/mount.d.ts +58 -9
- package/esm/mount.d.ts.map +1 -1
- package/esm/mount.js +32 -0
- package/esm/sdk-pluggable-application-model.d.ts +63 -11
- package/package.json +4 -4
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.
|
|
4
|
+
export const LIB_VERSION = "11.42.0-alpha.0";
|
|
5
5
|
/** @alpha */
|
|
6
6
|
export const LIB_DESCRIPTION = "GoodData SDK model contracts for pluggable applications";
|
|
7
7
|
/** @alpha */
|
package/esm/hostUi.d.ts
CHANGED
|
@@ -127,8 +127,8 @@ export interface IHostUiMountHandle {
|
|
|
127
127
|
* Pushes the active application's page-title segment into the host UI.
|
|
128
128
|
*
|
|
129
129
|
* @remarks
|
|
130
|
-
* Called by the host whenever the active pluggable application sets a page title
|
|
131
|
-
*
|
|
130
|
+
* Called by the host whenever the active pluggable application sets a page title by emitting a
|
|
131
|
+
* document-title-changed event. The host UI composes the browser tab title as
|
|
132
132
|
* `"{pageTitle} - {brand}"`. When called with `undefined`, the host UI falls back to the
|
|
133
133
|
* active application's manifest title.
|
|
134
134
|
*/
|
package/esm/index.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export { DefaultApplicationId } from "./defaultPlatformApplications.js";
|
|
|
7
7
|
export { LIB_VERSION, LIB_DESCRIPTION, LIB_NAME } from "./__version.js";
|
|
8
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
|
-
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";
|
|
10
|
+
export { type IAppHeaderOptions, type IAppInstance, type KnownPluggableAppEventTypeName, type IDocumentTitleChangedEvent, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type IPluggableAppTelemetryCallbacks, type IReloadPlatformContextRequestedEvent, type ITelemetryEventOptions, documentTitleChanged, isDocumentTitleChangedEvent, 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";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,e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B,EACvB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,WAAW,EACX,mBAAmB,EACnB,yBAAyB,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EACzC,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,2BAA2B,EAC3B,qCAAqC,EACrC,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,8BAA8B,EAC9B,KAAK,gBAAgB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yCAAyC,EAC9C,KAAK,WAAW,GACnB,MAAM,aAAa,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
export { DefaultApplicationId } from "./defaultPlatformApplications.js";
|
|
9
9
|
export { LIB_VERSION, LIB_DESCRIPTION, LIB_NAME } from "./__version.js";
|
|
10
10
|
export { PantherTier, isPlatformContextV1, isWorkspaceScopedSettings, } from "./platformContext.js";
|
|
11
|
-
export { isReloadPlatformContextRequestedEvent, PluggableAppEventType, reloadPlatformContextRequested, } from "./mount.js";
|
|
11
|
+
export { documentTitleChanged, isDocumentTitleChangedEvent, isReloadPlatformContextRequestedEvent, PluggableAppEventType, reloadPlatformContextRequested, } from "./mount.js";
|
package/esm/mount.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { type IPlatformContext } from "./platformContext.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const PluggableAppEventType: {
|
|
8
8
|
readonly RELOAD_PLATFORM_CONTEXT_REQUESTED: "GDC.PLUGGABLE_APP/EVT.RELOAD_PLATFORM_CONTEXT.REQUESTED";
|
|
9
|
+
readonly DOCUMENT_TITLE_CHANGED: "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED";
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* Union of known pluggable application event type names.
|
|
@@ -58,6 +59,38 @@ export declare function reloadPlatformContextRequested(): IReloadPlatformContext
|
|
|
58
59
|
* @alpha
|
|
59
60
|
*/
|
|
60
61
|
export declare function isReloadPlatformContextRequestedEvent(obj: unknown): obj is IReloadPlatformContextRequestedEvent;
|
|
62
|
+
/**
|
|
63
|
+
* Event setting the page-title segment of the browser tab title on the host.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* The host owns `document.title` and composes it as `"{pageTitle} - {brand}"`. A `pageTitle` of
|
|
67
|
+
* `undefined` tells the host to fall back to the application's manifest title.
|
|
68
|
+
*
|
|
69
|
+
* @alpha
|
|
70
|
+
*/
|
|
71
|
+
export interface IDocumentTitleChangedEvent extends IPluggableAppEvent {
|
|
72
|
+
readonly type: "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED";
|
|
73
|
+
readonly payload: {
|
|
74
|
+
readonly pageTitle: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates an {@link IDocumentTitleChangedEvent}.
|
|
79
|
+
*
|
|
80
|
+
* @alpha
|
|
81
|
+
*/
|
|
82
|
+
export declare function documentTitleChanged(pageTitle: string | undefined): IDocumentTitleChangedEvent;
|
|
83
|
+
/**
|
|
84
|
+
* Type guard for {@link IDocumentTitleChangedEvent}.
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* Validates the payload shape too (not just the type), so a malformed event — e.g. one emitted
|
|
88
|
+
* from JS or a mismatched remote module without the expected `payload` — is rejected rather than
|
|
89
|
+
* narrowed to a type whose later `payload.pageTitle` access would throw.
|
|
90
|
+
*
|
|
91
|
+
* @alpha
|
|
92
|
+
*/
|
|
93
|
+
export declare function isDocumentTitleChangedEvent(obj: unknown): obj is IDocumentTitleChangedEvent;
|
|
61
94
|
/**
|
|
62
95
|
* Telemetry channel determines which analytics pipeline receives the event.
|
|
63
96
|
*
|
|
@@ -193,15 +226,6 @@ export interface IPluggableApplicationMountOptions {
|
|
|
193
226
|
* The host falls back to its own defaults for any fields not present.
|
|
194
227
|
*/
|
|
195
228
|
onHeaderChange?: (header: IAppHeaderOptions) => void;
|
|
196
|
-
/**
|
|
197
|
-
* Callback invoked by the pluggable application to set the page-title segment of the browser
|
|
198
|
-
* tab title. The host owns `document.title` and composes it as `"{pageTitle} - {brand}"`.
|
|
199
|
-
*
|
|
200
|
-
* @remarks
|
|
201
|
-
* Call this at mount time and again whenever the page title changes (e.g. after navigating to
|
|
202
|
-
* a different dashboard). Pass `undefined` to fall back to the application's manifest title.
|
|
203
|
-
*/
|
|
204
|
-
onDocumentTitleChange?: (pageTitle: string | undefined) => void;
|
|
205
229
|
}
|
|
206
230
|
/**
|
|
207
231
|
* Handle returned from mount for lifecycle management and host -\> module interaction.
|
|
@@ -242,5 +266,30 @@ export interface IAppInstance extends IPluggableApplicationMountHandle {
|
|
|
242
266
|
*/
|
|
243
267
|
export interface IPluggableApp {
|
|
244
268
|
mount: PluggableApplicationMount;
|
|
269
|
+
/**
|
|
270
|
+
* Organization IDs allowed to load this app.
|
|
271
|
+
*
|
|
272
|
+
* @remarks
|
|
273
|
+
* The host enforces this check only for apps loaded from a secured remote origin
|
|
274
|
+
* (e.g. the shared demo plugins bucket). When enforced, the current organization's
|
|
275
|
+
* id must appear in this list or the host refuses to mount the app. Apps loaded
|
|
276
|
+
* from any other origin (same-hostname remotes, local modules) are not subject
|
|
277
|
+
* to this check.
|
|
278
|
+
*
|
|
279
|
+
* @alpha
|
|
280
|
+
*/
|
|
281
|
+
allowedOrganizations?: string[];
|
|
282
|
+
/**
|
|
283
|
+
* Unix milliseconds timestamp captured at build time.
|
|
284
|
+
*
|
|
285
|
+
* @remarks
|
|
286
|
+
* The host enforces this check only for apps loaded from a secured remote origin
|
|
287
|
+
* (e.g. the shared demo plugins bucket). When enforced, builds older than the host's
|
|
288
|
+
* freshness window are rejected. Apps loaded from any other origin are not subject
|
|
289
|
+
* to this check.
|
|
290
|
+
*
|
|
291
|
+
* @alpha
|
|
292
|
+
*/
|
|
293
|
+
buildTimestamp?: number;
|
|
245
294
|
}
|
|
246
295
|
//# sourceMappingURL=mount.d.ts.map
|
package/esm/mount.d.ts.map
CHANGED
|
@@ -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;;;;GAIG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GACtC,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEvF;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAA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aAAa;IAC1B,KAAK,EAAE,yBAAyB,CAAC;IAEjC;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
package/esm/mount.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export const PluggableAppEventType = {
|
|
8
8
|
RELOAD_PLATFORM_CONTEXT_REQUESTED: "GDC.PLUGGABLE_APP/EVT.RELOAD_PLATFORM_CONTEXT.REQUESTED",
|
|
9
|
+
DOCUMENT_TITLE_CHANGED: "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED",
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* Creates an {@link IReloadPlatformContextRequestedEvent}.
|
|
@@ -26,3 +27,34 @@ export function isReloadPlatformContextRequestedEvent(obj) {
|
|
|
26
27
|
"type" in obj &&
|
|
27
28
|
obj.type === "GDC.PLUGGABLE_APP/EVT.RELOAD_PLATFORM_CONTEXT.REQUESTED");
|
|
28
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Creates an {@link IDocumentTitleChangedEvent}.
|
|
32
|
+
*
|
|
33
|
+
* @alpha
|
|
34
|
+
*/
|
|
35
|
+
export function documentTitleChanged(pageTitle) {
|
|
36
|
+
return { type: "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED", payload: { pageTitle } };
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Type guard for {@link IDocumentTitleChangedEvent}.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Validates the payload shape too (not just the type), so a malformed event — e.g. one emitted
|
|
43
|
+
* from JS or a mismatched remote module without the expected `payload` — is rejected rather than
|
|
44
|
+
* narrowed to a type whose later `payload.pageTitle` access would throw.
|
|
45
|
+
*
|
|
46
|
+
* @alpha
|
|
47
|
+
*/
|
|
48
|
+
export function isDocumentTitleChangedEvent(obj) {
|
|
49
|
+
if (typeof obj !== "object" ||
|
|
50
|
+
obj === null ||
|
|
51
|
+
obj.type !== "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED") {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
const payload = obj.payload;
|
|
55
|
+
if (typeof payload !== "object" || payload === null) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const pageTitle = payload.pageTitle;
|
|
59
|
+
return typeof pageTitle === "string" || pageTitle === undefined;
|
|
60
|
+
}
|
|
@@ -35,6 +35,13 @@ export declare const DefaultApplicationId: {
|
|
|
35
35
|
WORKSPACE_CATALOG: string;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Creates an {@link IDocumentTitleChangedEvent}.
|
|
40
|
+
*
|
|
41
|
+
* @alpha
|
|
42
|
+
*/
|
|
43
|
+
export declare function documentTitleChanged(pageTitle: string | undefined): IDocumentTitleChangedEvent;
|
|
44
|
+
|
|
38
45
|
/**
|
|
39
46
|
* Plˍuggable application embedding mode.
|
|
40
47
|
*
|
|
@@ -137,6 +144,22 @@ export declare interface IContextDeferredAuthCredentials {
|
|
|
137
144
|
externalProviderId?: string;
|
|
138
145
|
}
|
|
139
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Event setting the page-title segment of the browser tab title on the host.
|
|
149
|
+
*
|
|
150
|
+
* @remarks
|
|
151
|
+
* The host owns `document.title` and composes it as `"{pageTitle} - {brand}"`. A `pageTitle` of
|
|
152
|
+
* `undefined` tells the host to fall back to the application's manifest title.
|
|
153
|
+
*
|
|
154
|
+
* @alpha
|
|
155
|
+
*/
|
|
156
|
+
export declare interface IDocumentTitleChangedEvent extends IPluggableAppEvent {
|
|
157
|
+
readonly type: "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED";
|
|
158
|
+
readonly payload: {
|
|
159
|
+
readonly pageTitle: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
140
163
|
/**
|
|
141
164
|
* Effective settings for the active application scope.
|
|
142
165
|
*
|
|
@@ -216,8 +239,8 @@ export declare interface IHostUiMountHandle {
|
|
|
216
239
|
* Pushes the active application's page-title segment into the host UI.
|
|
217
240
|
*
|
|
218
241
|
* @remarks
|
|
219
|
-
* Called by the host whenever the active pluggable application sets a page title
|
|
220
|
-
*
|
|
242
|
+
* Called by the host whenever the active pluggable application sets a page title by emitting a
|
|
243
|
+
* document-title-changed event. The host UI composes the browser tab title as
|
|
221
244
|
* `"{pageTitle} - {brand}"`. When called with `undefined`, the host UI falls back to the
|
|
222
245
|
* active application's manifest title.
|
|
223
246
|
*/
|
|
@@ -442,6 +465,31 @@ export declare interface IPlatformContextV1 {
|
|
|
442
465
|
*/
|
|
443
466
|
export declare interface IPluggableApp {
|
|
444
467
|
mount: PluggableApplicationMount;
|
|
468
|
+
/**
|
|
469
|
+
* Organization IDs allowed to load this app.
|
|
470
|
+
*
|
|
471
|
+
* @remarks
|
|
472
|
+
* The host enforces this check only for apps loaded from a secured remote origin
|
|
473
|
+
* (e.g. the shared demo plugins bucket). When enforced, the current organization's
|
|
474
|
+
* id must appear in this list or the host refuses to mount the app. Apps loaded
|
|
475
|
+
* from any other origin (same-hostname remotes, local modules) are not subject
|
|
476
|
+
* to this check.
|
|
477
|
+
*
|
|
478
|
+
* @alpha
|
|
479
|
+
*/
|
|
480
|
+
allowedOrganizations?: string[];
|
|
481
|
+
/**
|
|
482
|
+
* Unix milliseconds timestamp captured at build time.
|
|
483
|
+
*
|
|
484
|
+
* @remarks
|
|
485
|
+
* The host enforces this check only for apps loaded from a secured remote origin
|
|
486
|
+
* (e.g. the shared demo plugins bucket). When enforced, builds older than the host's
|
|
487
|
+
* freshness window are rejected. Apps loaded from any other origin are not subject
|
|
488
|
+
* to this check.
|
|
489
|
+
*
|
|
490
|
+
* @alpha
|
|
491
|
+
*/
|
|
492
|
+
buildTimestamp?: number;
|
|
445
493
|
}
|
|
446
494
|
|
|
447
495
|
/**
|
|
@@ -534,15 +582,6 @@ export declare interface IPluggableApplicationMountOptions {
|
|
|
534
582
|
* The host falls back to its own defaults for any fields not present.
|
|
535
583
|
*/
|
|
536
584
|
onHeaderChange?: (header: IAppHeaderOptions) => void;
|
|
537
|
-
/**
|
|
538
|
-
* Callback invoked by the pluggable application to set the page-title segment of the browser
|
|
539
|
-
* tab title. The host owns `document.title` and composes it as `"{pageTitle} - {brand}"`.
|
|
540
|
-
*
|
|
541
|
-
* @remarks
|
|
542
|
-
* Call this at mount time and again whenever the page title changes (e.g. after navigating to
|
|
543
|
-
* a different dashboard). Pass `undefined` to fall back to the application's manifest title.
|
|
544
|
-
*/
|
|
545
|
-
onDocumentTitleChange?: (pageTitle: string | undefined) => void;
|
|
546
585
|
}
|
|
547
586
|
|
|
548
587
|
/**
|
|
@@ -589,6 +628,18 @@ export declare interface IReloadPlatformContextRequestedEvent extends IPluggable
|
|
|
589
628
|
readonly type: "GDC.PLUGGABLE_APP/EVT.RELOAD_PLATFORM_CONTEXT.REQUESTED";
|
|
590
629
|
}
|
|
591
630
|
|
|
631
|
+
/**
|
|
632
|
+
* Type guard for {@link IDocumentTitleChangedEvent}.
|
|
633
|
+
*
|
|
634
|
+
* @remarks
|
|
635
|
+
* Validates the payload shape too (not just the type), so a malformed event — e.g. one emitted
|
|
636
|
+
* from JS or a mismatched remote module without the expected `payload` — is rejected rather than
|
|
637
|
+
* narrowed to a type whose later `payload.pageTitle` access would throw.
|
|
638
|
+
*
|
|
639
|
+
* @alpha
|
|
640
|
+
*/
|
|
641
|
+
export declare function isDocumentTitleChangedEvent(obj: unknown): obj is IDocumentTitleChangedEvent;
|
|
642
|
+
|
|
592
643
|
/**
|
|
593
644
|
* Type guard for {@link IPlatformContextV1}.
|
|
594
645
|
*
|
|
@@ -660,6 +711,7 @@ export declare enum PantherTier {
|
|
|
660
711
|
*/
|
|
661
712
|
export declare const PluggableAppEventType: {
|
|
662
713
|
readonly RELOAD_PLATFORM_CONTEXT_REQUESTED: "GDC.PLUGGABLE_APP/EVT.RELOAD_PLATFORM_CONTEXT.REQUESTED";
|
|
714
|
+
readonly DOCUMENT_TITLE_CHANGED: "GDC.PLUGGABLE_APP/EVT.DOCUMENT_TITLE.CHANGED";
|
|
663
715
|
};
|
|
664
716
|
|
|
665
717
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-pluggable-application-model",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.42.0-alpha.0",
|
|
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.
|
|
26
|
+
"@gooddata/sdk-model": "11.42.0-alpha.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"oxlint-tsgolint": "0.15.0",
|
|
48
48
|
"typescript": "5.9.3",
|
|
49
49
|
"vitest": "4.1.8",
|
|
50
|
-
"@gooddata/
|
|
51
|
-
"@gooddata/
|
|
50
|
+
"@gooddata/eslint-config": "11.42.0-alpha.0",
|
|
51
|
+
"@gooddata/oxlint-config": "11.42.0-alpha.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"_phase:build": "npm run build",
|