@redocly/theme 0.62.0-next.1 → 0.62.0-next.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.
@@ -138,7 +138,19 @@ export type ThemeHooks = {
138
138
  items: BffCatalogEntityRevision[];
139
139
  };
140
140
  useCatalogClassic: (config: CatalogConfig) => FilteredCatalog;
141
- useTelemetry: () => Omit<AsyncApiRealmUI.Telemetry, 'init' | 'updateCloudEventData' | 'forceFlush' | 'startSpan' | 'constructCloudEvent' | 'sendToOtelService'>;
141
+ useTelemetry: () => Omit<AsyncApiRealmUI.Telemetry, 'init' | 'updateCloudEventData' | 'forceFlush' | 'startSpan' | 'constructCloudEvent' | 'sendToOtelService'> & {
142
+ send<TEventType extends AsyncApiRealmUI.EventType>(event: TEventType, data?: AsyncApiRealmUI.EventPayload<TEventType>): void;
143
+ /**
144
+ * @deprecated This method is deprecated. Use send(event, data) instead.
145
+ */
146
+ send<TEventType extends AsyncApiRealmUI.EventType>(params: AsyncApiRealmUI.SendEventParams<TEventType>): void;
147
+ };
148
+ /**
149
+ * @deprecated This hook is deprecated. Use `useTelemetry` instead.
150
+ */
151
+ useOtelTelemetry: () => {
152
+ send<TEventType extends AsyncApiRealmUI.EventType>(params: AsyncApiRealmUI.SendEventParams<TEventType>): void;
153
+ };
142
154
  useUserTeams: () => string[];
143
155
  usePageData: () => PageData | null;
144
156
  usePageSharedData: <T = unknown>(dataId: string) => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.62.0-next.1",
3
+ "version": "0.62.0-next.2",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -177,7 +177,26 @@ export type ThemeHooks = {
177
177
  | 'startSpan'
178
178
  | 'constructCloudEvent'
179
179
  | 'sendToOtelService'
180
- >;
180
+ > & {
181
+ send<TEventType extends AsyncApiRealmUI.EventType>(
182
+ event: TEventType,
183
+ data?: AsyncApiRealmUI.EventPayload<TEventType>,
184
+ ): void;
185
+ /**
186
+ * @deprecated This method is deprecated. Use send(event, data) instead.
187
+ */
188
+ send<TEventType extends AsyncApiRealmUI.EventType>(
189
+ params: AsyncApiRealmUI.SendEventParams<TEventType>,
190
+ ): void;
191
+ };
192
+ /**
193
+ * @deprecated This hook is deprecated. Use `useTelemetry` instead.
194
+ */
195
+ useOtelTelemetry: () => {
196
+ send<TEventType extends AsyncApiRealmUI.EventType>(
197
+ params: AsyncApiRealmUI.SendEventParams<TEventType>,
198
+ ): void;
199
+ };
181
200
  useUserTeams: () => string[];
182
201
  usePageData: () => PageData | null;
183
202
  usePageSharedData: <T = unknown>(dataId: string) => T;