diff --git a/.changeset/whole-hands-cut.md b/.changeset/whole-hands-cut.md new file mode 100644 index 0000000000..4eaa68ce18 --- /dev/null +++ b/.changeset/whole-hands-cut.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-plugin-api': minor +--- + +BREAKING: The "CommonAnalyticsContext" type is now internal and no longer exported from this package. diff --git a/packages/frontend-plugin-api/report.api.md b/packages/frontend-plugin-api/report.api.md index 5ebdda66a6..2ec6359b03 100644 --- a/packages/frontend-plugin-api/report.api.md +++ b/packages/frontend-plugin-api/report.api.md @@ -115,9 +115,12 @@ export const AnalyticsContext: (options: { }) => JSX_2.Element; // @public -export type AnalyticsContextValue = CommonAnalyticsContext & { - [param in string]: string | boolean | number | undefined; -}; +export interface AnalyticsContextValue { + // (undocumented) + [key: string]: string | boolean | number | undefined; + extensionId: string; + pluginId: string; +} // @public export type AnalyticsEvent = { @@ -333,12 +336,6 @@ export { bitbucketAuthApiRef }; export { bitbucketServerAuthApiRef }; -// @public -export type CommonAnalyticsContext = { - pluginId: string; - extensionId: string; -}; - // @public (undocumented) export type ComponentRef = { id: string; diff --git a/packages/frontend-plugin-api/src/analytics/index.ts b/packages/frontend-plugin-api/src/analytics/index.ts index 651e8e105e..988a4e0163 100644 --- a/packages/frontend-plugin-api/src/analytics/index.ts +++ b/packages/frontend-plugin-api/src/analytics/index.ts @@ -15,5 +15,5 @@ */ export { AnalyticsContext } from './AnalyticsContext'; -export type { AnalyticsContextValue, CommonAnalyticsContext } from './types'; +export type { AnalyticsContextValue } from './types'; export { useAnalytics } from './useAnalytics'; diff --git a/packages/frontend-plugin-api/src/analytics/types.ts b/packages/frontend-plugin-api/src/analytics/types.ts index 3e3a9ad5eb..e9628dc628 100644 --- a/packages/frontend-plugin-api/src/analytics/types.ts +++ b/packages/frontend-plugin-api/src/analytics/types.ts @@ -15,11 +15,11 @@ */ /** - * Common analytics context attributes. + * Analytics context envelope. * * @public */ -export type CommonAnalyticsContext = { +export interface AnalyticsContextValue { /** * The nearest known parent plugin where the event was captured. */ @@ -29,13 +29,6 @@ export type CommonAnalyticsContext = { * The nearest known parent extension where the event was captured. */ extensionId: string; -}; -/** - * Analytics context envelope. - * - * @public - */ -export type AnalyticsContextValue = CommonAnalyticsContext & { - [param in string]: string | boolean | number | undefined; -}; + [key: string]: string | boolean | number | undefined; +}