@objectstack/runtime 3.2.1 → 3.2.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/dist/index.d.cts CHANGED
@@ -486,7 +486,7 @@ declare class HttpDispatcher {
486
486
  * Handles Analytics requests
487
487
  * path: sub-path after /analytics/
488
488
  */
489
- handleAnalytics(path: string, method: string, body: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
489
+ handleAnalytics(path: string, method: string, body: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
490
490
  /**
491
491
  * Handles i18n requests
492
492
  * path: sub-path after /i18n/
package/dist/index.d.ts CHANGED
@@ -486,7 +486,7 @@ declare class HttpDispatcher {
486
486
  * Handles Analytics requests
487
487
  * path: sub-path after /analytics/
488
488
  */
489
- handleAnalytics(path: string, method: string, body: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
489
+ handleAnalytics(path: string, method: string, body: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
490
490
  /**
491
491
  * Handles i18n requests
492
492
  * path: sub-path after /i18n/
package/dist/index.js CHANGED
@@ -565,21 +565,21 @@ var HttpDispatcher = class {
565
565
  * Handles Analytics requests
566
566
  * path: sub-path after /analytics/
567
567
  */
568
- async handleAnalytics(path, method, body, context) {
568
+ async handleAnalytics(path, method, body, _context) {
569
569
  const analyticsService = await this.getService(CoreServiceName.enum.analytics);
570
570
  if (!analyticsService) return { handled: false };
571
571
  const m = method.toUpperCase();
572
572
  const subPath = path.replace(/^\/+/, "");
573
573
  if (subPath === "query" && m === "POST") {
574
- const result = await analyticsService.query(body, { request: context.request });
574
+ const result = await analyticsService.query(body);
575
575
  return { handled: true, response: this.success(result) };
576
576
  }
577
577
  if (subPath === "meta" && m === "GET") {
578
- const result = await analyticsService.getMetadata({ request: context.request });
578
+ const result = await analyticsService.getMeta();
579
579
  return { handled: true, response: this.success(result) };
580
580
  }
581
581
  if (subPath === "sql" && m === "POST") {
582
- const result = await analyticsService.generateSql(body, { request: context.request });
582
+ const result = await analyticsService.generateSql(body);
583
583
  return { handled: true, response: this.success(result) };
584
584
  }
585
585
  return { handled: false };