@gooddata/sdk-pluggable-application-model 11.43.0-alpha.0 → 11.43.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/__version.js +1 -1
- package/esm/index.d.ts +2 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/mount.d.ts +75 -4
- package/esm/mount.d.ts.map +1 -1
- package/esm/sdk-pluggable-application-model.d.ts +183 -4
- package/esm/telemetry/telemetryProperties.d.ts +104 -0
- package/esm/telemetry/telemetryProperties.d.ts.map +1 -0
- package/esm/telemetry/telemetryProperties.js +40 -0
- package/esm/tsdoc-metadata.json +1 -1
- 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.43.0-alpha.
|
|
4
|
+
export const LIB_VERSION = "11.43.0-alpha.2";
|
|
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
|
@@ -7,6 +7,7 @@ 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 IDocumentTitleChangedEvent, type IOpenAiAssistantRequestedEvent, type ICloseAiAssistantRequestedEvent, type IAiAssistantContextChangedEvent, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type IPluggableAppTelemetryCallbacks, type IReloadPlatformContextRequestedEvent, type ITelemetryEventOptions, documentTitleChanged, isDocumentTitleChangedEvent, isOpenAiAssistantRequestedEvent, isCloseAiAssistantRequestedEvent, isAiAssistantContextChangedEvent, isReloadPlatformContextRequestedEvent, openAiAssistantRequested, closeAiAssistantRequested, aiAssistantContextChanged, type PluggableApplicationMount, PluggableAppEventType, type PluggableAppEventTypeName, reloadPlatformContextRequested, type TelemetryChannel, } from "./mount.js";
|
|
10
|
+
export { type IAppHeaderOptions, type IAppInstance, type KnownPluggableAppEventTypeName, type IDocumentTitleChangedEvent, type IOpenAiAssistantRequestedEvent, type ICloseAiAssistantRequestedEvent, type IAiAssistantContextChangedEvent, type IPluggableApp, type IPluggableApplicationMountHandle, type IPluggableApplicationMountOptions, type IPluggableAppEvent, type IPluggableAppLogRecord, type IPluggableAppTelemetryCallbacks, type IPluggableAppTelemetryEventData, type IReloadPlatformContextRequestedEvent, type ITelemetryEventOptions, documentTitleChanged, isDocumentTitleChangedEvent, isOpenAiAssistantRequestedEvent, isCloseAiAssistantRequestedEvent, isAiAssistantContextChangedEvent, isReloadPlatformContextRequestedEvent, openAiAssistantRequested, closeAiAssistantRequested, aiAssistantContextChanged, type PluggableApplicationMount, PluggableAppEventType, type PluggableAppEventTypeName, reloadPlatformContextRequested, type TelemetryChannel, } from "./mount.js";
|
|
11
|
+
export { type ITelemetryPropertySlot, type TelemetryPropertyScope, TELEMETRY_PROPERTIES, } from "./telemetry/telemetryProperties.js";
|
|
11
12
|
export { type IHostUiModule, type IHostUiMountHandle, type IHostUiMountOptions, type IHostUiNotification, type INewDeploymentAvailableHostUiNotification, type IOpenAiAssistantHostUiNotification, type ICloseAiAssistantHostUiNotification, type IAiAssistantContextHostUiNotification, type HostUiMount, } from "./hostUi.js";
|
|
12
13
|
//# 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,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,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,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,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,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,8BAA8B,EAC9B,KAAK,gBAAgB,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EAChC,qCAAqC,EACrC,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,8BAA8B,EAC9B,KAAK,gBAAgB,GACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,oBAAoB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yCAAyC,EAC9C,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,qCAAqC,EAC1C,KAAK,WAAW,GACnB,MAAM,aAAa,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -9,3 +9,4 @@ 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
11
|
export { documentTitleChanged, isDocumentTitleChangedEvent, isOpenAiAssistantRequestedEvent, isCloseAiAssistantRequestedEvent, isAiAssistantContextChangedEvent, isReloadPlatformContextRequestedEvent, openAiAssistantRequested, closeAiAssistantRequested, aiAssistantContextChanged, PluggableAppEventType, reloadPlatformContextRequested, } from "./mount.js";
|
|
12
|
+
export { TELEMETRY_PROPERTIES, } from "./telemetry/telemetryProperties.js";
|
package/esm/mount.d.ts
CHANGED
|
@@ -233,6 +233,52 @@ export interface ITelemetryEventOptions {
|
|
|
233
233
|
*/
|
|
234
234
|
channel?: TelemetryChannel;
|
|
235
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* A structured OpenTelemetry log record forwarded by a pluggable application to the host shell.
|
|
238
|
+
*
|
|
239
|
+
* @remarks
|
|
240
|
+
* Mirrors the shape of an OpenTelemetry `LogRecord` body/severity/attributes. The host emits it through
|
|
241
|
+
* its own page-level OTel logger (see {@link IPluggableAppTelemetryCallbacks.logRecord}), so the module
|
|
242
|
+
* does not need its own `LoggerProvider`. The host fills in the timestamp, resource and shared context
|
|
243
|
+
* (deployment / organization / user / source application) — the module supplies only the event-specific
|
|
244
|
+
* fields.
|
|
245
|
+
*
|
|
246
|
+
* @alpha
|
|
247
|
+
*/
|
|
248
|
+
export interface IPluggableAppLogRecord {
|
|
249
|
+
/** Log body — typically an event name such as `"timing-dashboard-load-kd"`. */
|
|
250
|
+
body: string;
|
|
251
|
+
/** OTel severity number (1–24). Defaults to `9` (INFO) when omitted. */
|
|
252
|
+
severityNumber?: number;
|
|
253
|
+
/** OTel severity text, e.g. `"INFO"`. Defaults to `"INFO"` when omitted. */
|
|
254
|
+
severityText?: string;
|
|
255
|
+
/** Event-specific attributes (e.g. `{ duration }`). Merged with the host's shared context. */
|
|
256
|
+
attributes?: Record<string, unknown>;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Transport-neutral structured data a pluggable application may attach to a telemetry event.
|
|
260
|
+
*
|
|
261
|
+
* @remarks
|
|
262
|
+
* Pluggable applications describe an event with these neutral groups and must NOT assume any particular
|
|
263
|
+
* analytics backend (Matomo, Amplitude, …) — the host shell decides how to record them. `identifiers` are
|
|
264
|
+
* sensitive entity ids (workspace, dashboard, report, …) the shell may hash and aggregate; `stats` are
|
|
265
|
+
* contextual metrics (counts, types, …). Any other key is a free-form event property. Passed as the `data`
|
|
266
|
+
* argument of {@link IPluggableAppTelemetryCallbacks.trackEvent}.
|
|
267
|
+
*
|
|
268
|
+
* @alpha
|
|
269
|
+
*/
|
|
270
|
+
export interface IPluggableAppTelemetryEventData {
|
|
271
|
+
[key: string]: unknown;
|
|
272
|
+
/**
|
|
273
|
+
* Sensitive entity identifiers for the event (e.g. `{ workspaceId, dashboardId }`). The shell decides
|
|
274
|
+
* how to record them — modules must not hash, pack or otherwise format them for a specific backend.
|
|
275
|
+
*/
|
|
276
|
+
identifiers?: Record<string, string>;
|
|
277
|
+
/**
|
|
278
|
+
* Contextual metrics / stats for the event (e.g. `{ insightsCount, attributeFiltersCount }`).
|
|
279
|
+
*/
|
|
280
|
+
stats?: Record<string, string | number | boolean>;
|
|
281
|
+
}
|
|
236
282
|
/**
|
|
237
283
|
* Telemetry callbacks provided by the shell to pluggable applications.
|
|
238
284
|
*
|
|
@@ -252,10 +298,35 @@ export interface IPluggableAppTelemetryCallbacks {
|
|
|
252
298
|
* @param options - Optional event configuration (e.g. channel routing).
|
|
253
299
|
*/
|
|
254
300
|
trackEvent: (eventName: string, data?: Record<string, unknown>, options?: ITelemetryEventOptions) => void;
|
|
255
|
-
/**
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Track a page view within the pluggable application.
|
|
303
|
+
*
|
|
304
|
+
* @param page - The page path/identifier.
|
|
305
|
+
* @param data - Optional neutral event data ({@link IPluggableAppTelemetryEventData}); `identifiers`
|
|
306
|
+
* keep the page view's workspace/dashboard attribution, `stats` carry contextual metrics.
|
|
307
|
+
*/
|
|
308
|
+
trackPageView: (page: string, data?: IPluggableAppTelemetryEventData) => void;
|
|
309
|
+
/**
|
|
310
|
+
* Track a timing measurement from the pluggable application.
|
|
311
|
+
*
|
|
312
|
+
* @param variable - The timing variable name.
|
|
313
|
+
* @param label - The timing label.
|
|
314
|
+
* @param valueMs - The measured duration in milliseconds.
|
|
315
|
+
* @param data - Optional neutral event data ({@link IPluggableAppTelemetryEventData}); a `category`
|
|
316
|
+
* property attributes the timing to the source app rather than the shell, `stats` carry metrics.
|
|
317
|
+
*/
|
|
318
|
+
trackTiming: (variable: string, label: string, valueMs: number, data?: IPluggableAppTelemetryEventData) => void;
|
|
319
|
+
/**
|
|
320
|
+
* Forward a structured OpenTelemetry log record to the host's page-level OTel logger.
|
|
321
|
+
*
|
|
322
|
+
* @remarks
|
|
323
|
+
* Unlike {@link IPluggableAppTelemetryCallbacks.trackEvent} (which routes to the analytics
|
|
324
|
+
* trackers — Matomo / Amplitude), this targets the host's OpenTelemetry logging pipeline (OTLP
|
|
325
|
+
* `/v1/logs`). It exists because the OTel Logs API cannot be reliably shared across module-federation
|
|
326
|
+
* bundles the way the global tracer is, so module logs are forwarded as plain data and re-emitted by
|
|
327
|
+
* the host. Optional: a host that has no OTel logger configured simply omits it (the call is a no-op).
|
|
328
|
+
*/
|
|
329
|
+
logRecord?: (record: IPluggableAppLogRecord) => void;
|
|
259
330
|
}
|
|
260
331
|
/**
|
|
261
332
|
* Header customization options that a pluggable application can push to the host shell.
|
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,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAMxB,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,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAqC,SAAQ,kBAAkB;IAC5E,QAAQ,CAAC,IAAI,EAAE,yDAAyD,CAAC;CAC5E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,IAAI,oCAAoC,CAErF;AAED;;;;GAIG;AACH,wB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;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;IAEjC;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -762,6 +762,29 @@ export declare interface IPluggableApplicationNavigation {
|
|
|
762
762
|
openApp(id: string, path?: string): void;
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
+
/**
|
|
766
|
+
* A structured OpenTelemetry log record forwarded by a pluggable application to the host shell.
|
|
767
|
+
*
|
|
768
|
+
* @remarks
|
|
769
|
+
* Mirrors the shape of an OpenTelemetry `LogRecord` body/severity/attributes. The host emits it through
|
|
770
|
+
* its own page-level OTel logger (see {@link IPluggableAppTelemetryCallbacks.logRecord}), so the module
|
|
771
|
+
* does not need its own `LoggerProvider`. The host fills in the timestamp, resource and shared context
|
|
772
|
+
* (deployment / organization / user / source application) — the module supplies only the event-specific
|
|
773
|
+
* fields.
|
|
774
|
+
*
|
|
775
|
+
* @alpha
|
|
776
|
+
*/
|
|
777
|
+
export declare interface IPluggableAppLogRecord {
|
|
778
|
+
/** Log body — typically an event name such as `"timing-dashboard-load-kd"`. */
|
|
779
|
+
body: string;
|
|
780
|
+
/** OTel severity number (1–24). Defaults to `9` (INFO) when omitted. */
|
|
781
|
+
severityNumber?: number;
|
|
782
|
+
/** OTel severity text, e.g. `"INFO"`. Defaults to `"INFO"` when omitted. */
|
|
783
|
+
severityText?: string;
|
|
784
|
+
/** Event-specific attributes (e.g. `{ duration }`). Merged with the host's shared context. */
|
|
785
|
+
attributes?: Record<string, unknown>;
|
|
786
|
+
}
|
|
787
|
+
|
|
765
788
|
/**
|
|
766
789
|
* Telemetry callbacks provided by the shell to pluggable applications.
|
|
767
790
|
*
|
|
@@ -781,10 +804,60 @@ export declare interface IPluggableAppTelemetryCallbacks {
|
|
|
781
804
|
* @param options - Optional event configuration (e.g. channel routing).
|
|
782
805
|
*/
|
|
783
806
|
trackEvent: (eventName: string, data?: Record<string, unknown>, options?: ITelemetryEventOptions) => void;
|
|
784
|
-
/**
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
807
|
+
/**
|
|
808
|
+
* Track a page view within the pluggable application.
|
|
809
|
+
*
|
|
810
|
+
* @param page - The page path/identifier.
|
|
811
|
+
* @param data - Optional neutral event data ({@link IPluggableAppTelemetryEventData}); `identifiers`
|
|
812
|
+
* keep the page view's workspace/dashboard attribution, `stats` carry contextual metrics.
|
|
813
|
+
*/
|
|
814
|
+
trackPageView: (page: string, data?: IPluggableAppTelemetryEventData) => void;
|
|
815
|
+
/**
|
|
816
|
+
* Track a timing measurement from the pluggable application.
|
|
817
|
+
*
|
|
818
|
+
* @param variable - The timing variable name.
|
|
819
|
+
* @param label - The timing label.
|
|
820
|
+
* @param valueMs - The measured duration in milliseconds.
|
|
821
|
+
* @param data - Optional neutral event data ({@link IPluggableAppTelemetryEventData}); a `category`
|
|
822
|
+
* property attributes the timing to the source app rather than the shell, `stats` carry metrics.
|
|
823
|
+
*/
|
|
824
|
+
trackTiming: (variable: string, label: string, valueMs: number, data?: IPluggableAppTelemetryEventData) => void;
|
|
825
|
+
/**
|
|
826
|
+
* Forward a structured OpenTelemetry log record to the host's page-level OTel logger.
|
|
827
|
+
*
|
|
828
|
+
* @remarks
|
|
829
|
+
* Unlike {@link IPluggableAppTelemetryCallbacks.trackEvent} (which routes to the analytics
|
|
830
|
+
* trackers — Matomo / Amplitude), this targets the host's OpenTelemetry logging pipeline (OTLP
|
|
831
|
+
* `/v1/logs`). It exists because the OTel Logs API cannot be reliably shared across module-federation
|
|
832
|
+
* bundles the way the global tracer is, so module logs are forwarded as plain data and re-emitted by
|
|
833
|
+
* the host. Optional: a host that has no OTel logger configured simply omits it (the call is a no-op).
|
|
834
|
+
*/
|
|
835
|
+
logRecord?: (record: IPluggableAppLogRecord) => void;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Transport-neutral structured data a pluggable application may attach to a telemetry event.
|
|
840
|
+
*
|
|
841
|
+
* @remarks
|
|
842
|
+
* Pluggable applications describe an event with these neutral groups and must NOT assume any particular
|
|
843
|
+
* analytics backend (Matomo, Amplitude, …) — the host shell decides how to record them. `identifiers` are
|
|
844
|
+
* sensitive entity ids (workspace, dashboard, report, …) the shell may hash and aggregate; `stats` are
|
|
845
|
+
* contextual metrics (counts, types, …). Any other key is a free-form event property. Passed as the `data`
|
|
846
|
+
* argument of {@link IPluggableAppTelemetryCallbacks.trackEvent}.
|
|
847
|
+
*
|
|
848
|
+
* @alpha
|
|
849
|
+
*/
|
|
850
|
+
export declare interface IPluggableAppTelemetryEventData {
|
|
851
|
+
[key: string]: unknown;
|
|
852
|
+
/**
|
|
853
|
+
* Sensitive entity identifiers for the event (e.g. `{ workspaceId, dashboardId }`). The shell decides
|
|
854
|
+
* how to record them — modules must not hash, pack or otherwise format them for a specific backend.
|
|
855
|
+
*/
|
|
856
|
+
identifiers?: Record<string, string>;
|
|
857
|
+
/**
|
|
858
|
+
* Contextual metrics / stats for the event (e.g. `{ insightsCount, attributeFiltersCount }`).
|
|
859
|
+
*/
|
|
860
|
+
stats?: Record<string, string | number | boolean>;
|
|
788
861
|
}
|
|
789
862
|
|
|
790
863
|
/**
|
|
@@ -869,6 +942,21 @@ export declare interface ITelemetryEventOptions {
|
|
|
869
942
|
channel?: TelemetryChannel;
|
|
870
943
|
}
|
|
871
944
|
|
|
945
|
+
/**
|
|
946
|
+
* A single telemetry property slot: its 1-based index, the name reported under that index, and scope.
|
|
947
|
+
*
|
|
948
|
+
* @remarks
|
|
949
|
+
* The analytics backend the shell uses aggregates these by `(scope, index)`, so the index — not the name —
|
|
950
|
+
* is the stable contract.
|
|
951
|
+
*
|
|
952
|
+
* @alpha
|
|
953
|
+
*/
|
|
954
|
+
export declare interface ITelemetryPropertySlot {
|
|
955
|
+
index: number;
|
|
956
|
+
name: string;
|
|
957
|
+
scope: TelemetryPropertyScope;
|
|
958
|
+
}
|
|
959
|
+
|
|
872
960
|
/**
|
|
873
961
|
* Union of known pluggable application event type names.
|
|
874
962
|
*
|
|
@@ -947,6 +1035,90 @@ export declare type PluggableApplicationMount = (options: IPluggableApplicationM
|
|
|
947
1035
|
*/
|
|
948
1036
|
export declare function reloadPlatformContextRequested(): IReloadPlatformContextRequestedEvent;
|
|
949
1037
|
|
|
1038
|
+
/**
|
|
1039
|
+
* Canonical, single-source-of-truth allocation of the shell's telemetry property slots, so a given
|
|
1040
|
+
* `(scope, index)` means the same thing everywhere it is reported.
|
|
1041
|
+
*
|
|
1042
|
+
* @remarks
|
|
1043
|
+
* The shell's analytics backend aggregates properties by `(scope, index)`, not by the name passed at call
|
|
1044
|
+
* time — so the index is the contract, and slots must be sourced from here rather than assigned by array
|
|
1045
|
+
* position.
|
|
1046
|
+
*
|
|
1047
|
+
* This registry is **shell-owned**: only the host shell consumes it when serializing telemetry. Pluggable
|
|
1048
|
+
* modules never reference it — they forward transport-neutral telemetry (see the `identifiers` / `stats`
|
|
1049
|
+
* groups on {@link IPluggableAppTelemetryEventData}) and the host alone maps that onto the packed page
|
|
1050
|
+
* slots below. (The legacy standalone trackers still read it directly until standalone mode is removed.)
|
|
1051
|
+
*
|
|
1052
|
+
* Page slots:
|
|
1053
|
+
* - `Multivalue` (1) — packed `key1=v1,…` of the event's sensitive identifiers (the shell hashes them).
|
|
1054
|
+
* - `StatsValue` (2) — packed `key1=v1,…` of the event's contextual stats/metrics (verbatim).
|
|
1055
|
+
* - `ModuleReactVersion` / `ModuleSdkVersion` (3/4) — the emitting module's runtime versions.
|
|
1056
|
+
*
|
|
1057
|
+
* Both packed values are bounded to ~200 chars by the backend. Module React / SDK versions use `"page"`
|
|
1058
|
+
* scope (not `"visit"`): the active pluggable module can change within a session as the user navigates
|
|
1059
|
+
* between apps, so the version is an action-level attribute that must ride only the event it describes.
|
|
1060
|
+
* (The host's own React / SDK versions are constant per session, so they stay in `"visit"` scope at 6/7.)
|
|
1061
|
+
*
|
|
1062
|
+
* @alpha
|
|
1063
|
+
*/
|
|
1064
|
+
export declare const TELEMETRY_PROPERTIES: {
|
|
1065
|
+
readonly deploymentId: {
|
|
1066
|
+
readonly index: 1;
|
|
1067
|
+
readonly name: "DeploymentId";
|
|
1068
|
+
readonly scope: "visit";
|
|
1069
|
+
};
|
|
1070
|
+
readonly organizationId: {
|
|
1071
|
+
readonly index: 2;
|
|
1072
|
+
readonly name: "OrganizationId";
|
|
1073
|
+
readonly scope: "visit";
|
|
1074
|
+
};
|
|
1075
|
+
readonly sessionId: {
|
|
1076
|
+
readonly index: 3;
|
|
1077
|
+
readonly name: "SessionId";
|
|
1078
|
+
readonly scope: "visit";
|
|
1079
|
+
};
|
|
1080
|
+
readonly revHash: {
|
|
1081
|
+
readonly index: 4;
|
|
1082
|
+
readonly name: "RevHash";
|
|
1083
|
+
readonly scope: "visit";
|
|
1084
|
+
};
|
|
1085
|
+
readonly isExport: {
|
|
1086
|
+
readonly index: 5;
|
|
1087
|
+
readonly name: "isExport";
|
|
1088
|
+
readonly scope: "visit";
|
|
1089
|
+
};
|
|
1090
|
+
readonly hostReactVersion: {
|
|
1091
|
+
readonly index: 6;
|
|
1092
|
+
readonly name: "HostReactVersion";
|
|
1093
|
+
readonly scope: "visit";
|
|
1094
|
+
};
|
|
1095
|
+
readonly hostSdkVersion: {
|
|
1096
|
+
readonly index: 7;
|
|
1097
|
+
readonly name: "HostSdkVersion";
|
|
1098
|
+
readonly scope: "visit";
|
|
1099
|
+
};
|
|
1100
|
+
readonly multivalue: {
|
|
1101
|
+
readonly index: 1;
|
|
1102
|
+
readonly name: "Multivalue";
|
|
1103
|
+
readonly scope: "page";
|
|
1104
|
+
};
|
|
1105
|
+
readonly statsValue: {
|
|
1106
|
+
readonly index: 2;
|
|
1107
|
+
readonly name: "StatsValue";
|
|
1108
|
+
readonly scope: "page";
|
|
1109
|
+
};
|
|
1110
|
+
readonly moduleReactVersion: {
|
|
1111
|
+
readonly index: 3;
|
|
1112
|
+
readonly name: "ModuleReactVersion";
|
|
1113
|
+
readonly scope: "page";
|
|
1114
|
+
};
|
|
1115
|
+
readonly moduleSdkVersion: {
|
|
1116
|
+
readonly index: 4;
|
|
1117
|
+
readonly name: "ModuleSdkVersion";
|
|
1118
|
+
readonly scope: "page";
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
1121
|
+
|
|
950
1122
|
/**
|
|
951
1123
|
* Telemetry channel determines which analytics pipeline receives the event.
|
|
952
1124
|
*
|
|
@@ -958,4 +1130,11 @@ export declare function reloadPlatformContextRequested(): IReloadPlatformContext
|
|
|
958
1130
|
*/
|
|
959
1131
|
export declare type TelemetryChannel = "standard" | "ai";
|
|
960
1132
|
|
|
1133
|
+
/**
|
|
1134
|
+
* Scope of a telemetry property slot — `"visit"` persists for the whole session, `"page"` is per action.
|
|
1135
|
+
*
|
|
1136
|
+
* @alpha
|
|
1137
|
+
*/
|
|
1138
|
+
export declare type TelemetryPropertyScope = "visit" | "page";
|
|
1139
|
+
|
|
961
1140
|
export { }
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scope of a telemetry property slot — `"visit"` persists for the whole session, `"page"` is per action.
|
|
3
|
+
*
|
|
4
|
+
* @alpha
|
|
5
|
+
*/
|
|
6
|
+
export type TelemetryPropertyScope = "visit" | "page";
|
|
7
|
+
/**
|
|
8
|
+
* A single telemetry property slot: its 1-based index, the name reported under that index, and scope.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The analytics backend the shell uses aggregates these by `(scope, index)`, so the index — not the name —
|
|
12
|
+
* is the stable contract.
|
|
13
|
+
*
|
|
14
|
+
* @alpha
|
|
15
|
+
*/
|
|
16
|
+
export interface ITelemetryPropertySlot {
|
|
17
|
+
index: number;
|
|
18
|
+
name: string;
|
|
19
|
+
scope: TelemetryPropertyScope;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Canonical, single-source-of-truth allocation of the shell's telemetry property slots, so a given
|
|
23
|
+
* `(scope, index)` means the same thing everywhere it is reported.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* The shell's analytics backend aggregates properties by `(scope, index)`, not by the name passed at call
|
|
27
|
+
* time — so the index is the contract, and slots must be sourced from here rather than assigned by array
|
|
28
|
+
* position.
|
|
29
|
+
*
|
|
30
|
+
* This registry is **shell-owned**: only the host shell consumes it when serializing telemetry. Pluggable
|
|
31
|
+
* modules never reference it — they forward transport-neutral telemetry (see the `identifiers` / `stats`
|
|
32
|
+
* groups on {@link IPluggableAppTelemetryEventData}) and the host alone maps that onto the packed page
|
|
33
|
+
* slots below. (The legacy standalone trackers still read it directly until standalone mode is removed.)
|
|
34
|
+
*
|
|
35
|
+
* Page slots:
|
|
36
|
+
* - `Multivalue` (1) — packed `key1=v1,…` of the event's sensitive identifiers (the shell hashes them).
|
|
37
|
+
* - `StatsValue` (2) — packed `key1=v1,…` of the event's contextual stats/metrics (verbatim).
|
|
38
|
+
* - `ModuleReactVersion` / `ModuleSdkVersion` (3/4) — the emitting module's runtime versions.
|
|
39
|
+
*
|
|
40
|
+
* Both packed values are bounded to ~200 chars by the backend. Module React / SDK versions use `"page"`
|
|
41
|
+
* scope (not `"visit"`): the active pluggable module can change within a session as the user navigates
|
|
42
|
+
* between apps, so the version is an action-level attribute that must ride only the event it describes.
|
|
43
|
+
* (The host's own React / SDK versions are constant per session, so they stay in `"visit"` scope at 6/7.)
|
|
44
|
+
*
|
|
45
|
+
* @alpha
|
|
46
|
+
*/
|
|
47
|
+
export declare const TELEMETRY_PROPERTIES: {
|
|
48
|
+
readonly deploymentId: {
|
|
49
|
+
readonly index: 1;
|
|
50
|
+
readonly name: "DeploymentId";
|
|
51
|
+
readonly scope: "visit";
|
|
52
|
+
};
|
|
53
|
+
readonly organizationId: {
|
|
54
|
+
readonly index: 2;
|
|
55
|
+
readonly name: "OrganizationId";
|
|
56
|
+
readonly scope: "visit";
|
|
57
|
+
};
|
|
58
|
+
readonly sessionId: {
|
|
59
|
+
readonly index: 3;
|
|
60
|
+
readonly name: "SessionId";
|
|
61
|
+
readonly scope: "visit";
|
|
62
|
+
};
|
|
63
|
+
readonly revHash: {
|
|
64
|
+
readonly index: 4;
|
|
65
|
+
readonly name: "RevHash";
|
|
66
|
+
readonly scope: "visit";
|
|
67
|
+
};
|
|
68
|
+
readonly isExport: {
|
|
69
|
+
readonly index: 5;
|
|
70
|
+
readonly name: "isExport";
|
|
71
|
+
readonly scope: "visit";
|
|
72
|
+
};
|
|
73
|
+
readonly hostReactVersion: {
|
|
74
|
+
readonly index: 6;
|
|
75
|
+
readonly name: "HostReactVersion";
|
|
76
|
+
readonly scope: "visit";
|
|
77
|
+
};
|
|
78
|
+
readonly hostSdkVersion: {
|
|
79
|
+
readonly index: 7;
|
|
80
|
+
readonly name: "HostSdkVersion";
|
|
81
|
+
readonly scope: "visit";
|
|
82
|
+
};
|
|
83
|
+
readonly multivalue: {
|
|
84
|
+
readonly index: 1;
|
|
85
|
+
readonly name: "Multivalue";
|
|
86
|
+
readonly scope: "page";
|
|
87
|
+
};
|
|
88
|
+
readonly statsValue: {
|
|
89
|
+
readonly index: 2;
|
|
90
|
+
readonly name: "StatsValue";
|
|
91
|
+
readonly scope: "page";
|
|
92
|
+
};
|
|
93
|
+
readonly moduleReactVersion: {
|
|
94
|
+
readonly index: 3;
|
|
95
|
+
readonly name: "ModuleReactVersion";
|
|
96
|
+
readonly scope: "page";
|
|
97
|
+
};
|
|
98
|
+
readonly moduleSdkVersion: {
|
|
99
|
+
readonly index: 4;
|
|
100
|
+
readonly name: "ModuleSdkVersion";
|
|
101
|
+
readonly scope: "page";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=telemetryProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetryProperties.d.ts","sourceRoot":"","sources":["../../src/telemetry/telemetryProperties.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,sBAAsB,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY0B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
/**
|
|
3
|
+
* Canonical, single-source-of-truth allocation of the shell's telemetry property slots, so a given
|
|
4
|
+
* `(scope, index)` means the same thing everywhere it is reported.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The shell's analytics backend aggregates properties by `(scope, index)`, not by the name passed at call
|
|
8
|
+
* time — so the index is the contract, and slots must be sourced from here rather than assigned by array
|
|
9
|
+
* position.
|
|
10
|
+
*
|
|
11
|
+
* This registry is **shell-owned**: only the host shell consumes it when serializing telemetry. Pluggable
|
|
12
|
+
* modules never reference it — they forward transport-neutral telemetry (see the `identifiers` / `stats`
|
|
13
|
+
* groups on {@link IPluggableAppTelemetryEventData}) and the host alone maps that onto the packed page
|
|
14
|
+
* slots below. (The legacy standalone trackers still read it directly until standalone mode is removed.)
|
|
15
|
+
*
|
|
16
|
+
* Page slots:
|
|
17
|
+
* - `Multivalue` (1) — packed `key1=v1,…` of the event's sensitive identifiers (the shell hashes them).
|
|
18
|
+
* - `StatsValue` (2) — packed `key1=v1,…` of the event's contextual stats/metrics (verbatim).
|
|
19
|
+
* - `ModuleReactVersion` / `ModuleSdkVersion` (3/4) — the emitting module's runtime versions.
|
|
20
|
+
*
|
|
21
|
+
* Both packed values are bounded to ~200 chars by the backend. Module React / SDK versions use `"page"`
|
|
22
|
+
* scope (not `"visit"`): the active pluggable module can change within a session as the user navigates
|
|
23
|
+
* between apps, so the version is an action-level attribute that must ride only the event it describes.
|
|
24
|
+
* (The host's own React / SDK versions are constant per session, so they stay in `"visit"` scope at 6/7.)
|
|
25
|
+
*
|
|
26
|
+
* @alpha
|
|
27
|
+
*/
|
|
28
|
+
export const TELEMETRY_PROPERTIES = {
|
|
29
|
+
deploymentId: { index: 1, name: "DeploymentId", scope: "visit" },
|
|
30
|
+
organizationId: { index: 2, name: "OrganizationId", scope: "visit" },
|
|
31
|
+
sessionId: { index: 3, name: "SessionId", scope: "visit" },
|
|
32
|
+
revHash: { index: 4, name: "RevHash", scope: "visit" },
|
|
33
|
+
isExport: { index: 5, name: "isExport", scope: "visit" },
|
|
34
|
+
hostReactVersion: { index: 6, name: "HostReactVersion", scope: "visit" },
|
|
35
|
+
hostSdkVersion: { index: 7, name: "HostSdkVersion", scope: "visit" },
|
|
36
|
+
multivalue: { index: 1, name: "Multivalue", scope: "page" },
|
|
37
|
+
statsValue: { index: 2, name: "StatsValue", scope: "page" },
|
|
38
|
+
moduleReactVersion: { index: 3, name: "ModuleReactVersion", scope: "page" },
|
|
39
|
+
moduleSdkVersion: { index: 4, name: "ModuleSdkVersion", scope: "page" },
|
|
40
|
+
};
|
package/esm/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-pluggable-application-model",
|
|
3
|
-
"version": "11.43.0-alpha.
|
|
3
|
+
"version": "11.43.0-alpha.2",
|
|
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.43.0-alpha.
|
|
26
|
+
"@gooddata/sdk-model": "11.43.0-alpha.2"
|
|
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/eslint-config": "11.43.0-alpha.
|
|
51
|
-
"@gooddata/oxlint-config": "11.43.0-alpha.
|
|
50
|
+
"@gooddata/eslint-config": "11.43.0-alpha.2",
|
|
51
|
+
"@gooddata/oxlint-config": "11.43.0-alpha.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"_phase:build": "npm run build",
|