@iblai/web-utils 1.1.7 → 1.1.9

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/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- 'use client';
2
1
  'use strict';
3
2
 
4
3
  var React = require('react');
@@ -1220,10 +1219,13 @@ const getPlatform = () => {
1220
1219
  }
1221
1220
  return "unknown";
1222
1221
  };
1222
+ // Safe access to platform-specific APIs
1223
1223
  const safeRequire = (moduleName) => {
1224
1224
  try {
1225
- if (typeof __non_webpack_require__ !== "undefined") {
1226
- return __non_webpack_require__(moduleName);
1225
+ // eslint-disable-next-line no-undef, @typescript-eslint/no-require-imports
1226
+ if (typeof require !== "undefined") {
1227
+ // eslint-disable-next-line no-undef, @typescript-eslint/no-require-imports
1228
+ return require(moduleName);
1227
1229
  }
1228
1230
  }
1229
1231
  catch (error) {
@@ -15237,6 +15239,14 @@ const NON_AI_ANALYTICS_ENDPOINTS = {
15237
15239
  service: SERVICES.DM,
15238
15240
  path: (args) => `/api/analytics/conversations?platform_key=${args.platform_key}${args.mentor_unique_id ? `&mentor_unique_id=${args.mentor_unique_id}` : ''}&metric=${args.metric}${args.date_filter ? `&date_filter=${args.date_filter}` : ''}${args.start_date ? `&start_date=${args.start_date}` : ''}${args.end_date ? `&end_date=${args.end_date}` : ''}`,
15239
15241
  },
15242
+ GET_CONTENT_ANALYTICS: {
15243
+ service: SERVICES.DM,
15244
+ path: () => `/api/analytics/content/`,
15245
+ },
15246
+ GET_CONTENT_ANALYTICS_DETAILS: {
15247
+ service: SERVICES.DM,
15248
+ path: (content_id) => `/api/analytics/content/details/${content_id}/`,
15249
+ },
15240
15250
  };
15241
15251
  const ANALYTICS_REDUCER_PATH = 'analyticsApiSlice';
15242
15252
 
@@ -15521,6 +15531,20 @@ createApi({
15521
15531
  service: NON_AI_ANALYTICS_ENDPOINTS.GET_TRANSCRIPTS_CONVERSATION_HEADLINE.service,
15522
15532
  }),
15523
15533
  }),
15534
+ getContentAnalytics: builder.query({
15535
+ query: (args) => ({
15536
+ url: NON_AI_ANALYTICS_ENDPOINTS.GET_CONTENT_ANALYTICS.path(),
15537
+ service: NON_AI_ANALYTICS_ENDPOINTS.GET_CONTENT_ANALYTICS.service,
15538
+ params: args,
15539
+ }),
15540
+ }),
15541
+ getContentAnalyticsDetails: builder.query({
15542
+ query: (args) => ({
15543
+ url: NON_AI_ANALYTICS_ENDPOINTS.GET_CONTENT_ANALYTICS_DETAILS.path(args.content_id),
15544
+ service: NON_AI_ANALYTICS_ENDPOINTS.GET_CONTENT_ANALYTICS_DETAILS.service,
15545
+ params: args,
15546
+ }),
15547
+ }),
15524
15548
  }),
15525
15549
  });
15526
15550