@gooddata/sdk-pluggable-application-model 11.28.0-alpha.0 → 11.28.0-alpha.2
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 +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/mount.d.ts +57 -0
- package/esm/mount.d.ts.map +1 -1
- package/esm/sdk-pluggable-application-model.d.ts +60 -0
- package/package.json +5 -5
package/esm/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { type EmbeddingMode, 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
|
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,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,
|
|
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,+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/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.
|
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;;;;;;;;;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;
|
|
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;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,IAAI,CAAC;AAEjD;;;;GAIG;AACH,MAAM,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ED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,yBAAyB,CAAC;CACpC"}
|
|
@@ -169,6 +169,16 @@ export declare interface IPluggableApplicationMountOptions {
|
|
|
169
169
|
* instance.
|
|
170
170
|
*/
|
|
171
171
|
onEvent?: (e: IPluggableAppEvent) => void;
|
|
172
|
+
/**
|
|
173
|
+
* Telemetry callbacks for the pluggable application to track events through the shell's
|
|
174
|
+
* centralized telemetry system.
|
|
175
|
+
*
|
|
176
|
+
* @remarks
|
|
177
|
+
* This is the preferred way for pluggable applications to emit telemetry. Events are
|
|
178
|
+
* automatically tagged with the source application ID and forwarded to all configured
|
|
179
|
+
* telemetry providers registered in the shell application.
|
|
180
|
+
*/
|
|
181
|
+
onTelemetryEvent?: IPluggableAppTelemetryCallbacks;
|
|
172
182
|
}
|
|
173
183
|
|
|
174
184
|
/**
|
|
@@ -181,6 +191,31 @@ export declare interface IPluggableApplicationNavigation {
|
|
|
181
191
|
openApp(id: string, path?: string): void;
|
|
182
192
|
}
|
|
183
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Telemetry callbacks provided by the shell to pluggable applications.
|
|
196
|
+
*
|
|
197
|
+
* @remarks
|
|
198
|
+
* Pluggable applications can use these methods to log events through the shell's
|
|
199
|
+
* centralized telemetry system. All events are automatically tagged with the
|
|
200
|
+
* source application ID.
|
|
201
|
+
*
|
|
202
|
+
* @alpha
|
|
203
|
+
*/
|
|
204
|
+
export declare interface IPluggableAppTelemetryCallbacks {
|
|
205
|
+
/**
|
|
206
|
+
* Track a custom telemetry event from the pluggable application.
|
|
207
|
+
*
|
|
208
|
+
* @param eventName - Name of the event.
|
|
209
|
+
* @param data - Optional key-value payload.
|
|
210
|
+
* @param options - Optional event configuration (e.g. channel routing).
|
|
211
|
+
*/
|
|
212
|
+
trackEvent: (eventName: string, data?: Record<string, unknown>, options?: ITelemetryEventOptions) => void;
|
|
213
|
+
/** Track a page view within the pluggable application. */
|
|
214
|
+
trackPageView: (page: string) => void;
|
|
215
|
+
/** Track a timing measurement from the pluggable application. */
|
|
216
|
+
trackTiming: (variable: string, label: string, valueMs: number) => void;
|
|
217
|
+
}
|
|
218
|
+
|
|
184
219
|
/**
|
|
185
220
|
* Shell UI module contract.
|
|
186
221
|
*
|
|
@@ -290,6 +325,20 @@ export declare interface IShellUiMountOptions {
|
|
|
290
325
|
*/
|
|
291
326
|
export declare function isPlatformContextV1(context: unknown): context is IPlatformContextV1;
|
|
292
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Optional configuration for a telemetry event.
|
|
330
|
+
*
|
|
331
|
+
* @alpha
|
|
332
|
+
*/
|
|
333
|
+
export declare interface ITelemetryEventOptions {
|
|
334
|
+
/**
|
|
335
|
+
* Which analytics channel to route the event to.
|
|
336
|
+
*
|
|
337
|
+
* @defaultValue `"standard"`
|
|
338
|
+
*/
|
|
339
|
+
channel?: TelemetryChannel;
|
|
340
|
+
}
|
|
341
|
+
|
|
293
342
|
/**
|
|
294
343
|
* Panther tier.
|
|
295
344
|
*
|
|
@@ -325,4 +374,15 @@ export declare type PluggableApplicationMount = (options: IPluggableApplicationM
|
|
|
325
374
|
*/
|
|
326
375
|
export declare type ShellUiMount = (options: IShellUiMountOptions) => IShellUiMountHandle;
|
|
327
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Telemetry channel determines which analytics pipeline receives the event.
|
|
379
|
+
*
|
|
380
|
+
* @remarks
|
|
381
|
+
* - `"standard"` — default channel for general UI events.
|
|
382
|
+
* - `"ai"` — channel for AI-related events that require separate compliance handling.
|
|
383
|
+
*
|
|
384
|
+
* @alpha
|
|
385
|
+
*/
|
|
386
|
+
export declare type TelemetryChannel = "standard" | "ai";
|
|
387
|
+
|
|
328
388
|
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.
|
|
3
|
+
"version": "11.28.0-alpha.2",
|
|
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.
|
|
27
|
-
"@gooddata/sdk-model": "11.28.0-alpha.
|
|
26
|
+
"@gooddata/sdk-backend-spi": "11.28.0-alpha.2",
|
|
27
|
+
"@gooddata/sdk-model": "11.28.0-alpha.2"
|
|
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/
|
|
52
|
-
"@gooddata/
|
|
51
|
+
"@gooddata/oxlint-config": "11.28.0-alpha.2",
|
|
52
|
+
"@gooddata/eslint-config": "11.28.0-alpha.2"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"_phase:build": "npm run build",
|