@boostyourleads/antigravity-sdk 1.0.7 → 1.0.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.
@@ -1,5 +1,8 @@
1
1
  "use strict";
2
2
  "use client";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
3
6
  Object.defineProperty(exports, "__esModule", { value: true });
4
7
  exports.AttributionDashboard = void 0;
5
8
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -10,7 +13,7 @@ const recharts_1 = require("recharts");
10
13
  const GlassmorphicCard_1 = require("./GlassmorphicCard");
11
14
  const PremiumMetricCard_1 = require("./PremiumMetricCard");
12
15
  const PremiumChart_1 = require("./PremiumChart");
13
- const index_1 = require("../index");
16
+ const axios_1 = __importDefault(require("axios"));
14
17
  const AttributionDashboard = ({ apiKey: initialApiKey, onConnect, onDisconnect, className }) => {
15
18
  const [apiKey, setApiKey] = (0, react_1.useState)(initialApiKey || "");
16
19
  const [isSaved, setIsSaved] = (0, react_1.useState)(!!initialApiKey);
@@ -36,8 +39,13 @@ const AttributionDashboard = ({ apiKey: initialApiKey, onConnect, onDisconnect,
36
39
  setLoading(true);
37
40
  setError(null);
38
41
  try {
39
- const agent = new index_1.AntigravityAgent({ apiKey: token });
40
- const scan = await agent.checkRevenueIntegrity();
42
+ const response = await axios_1.default.post("https://back-end.boostyourleads.ca/api/agent/revenue-integrity", {}, {
43
+ headers: {
44
+ 'Authorization': `Bearer ${token}`,
45
+ 'Content-Type': 'application/json'
46
+ }
47
+ });
48
+ const scan = response.data;
41
49
  // Real Data populated from SDK checks
42
50
  setData({
43
51
  spend: 150450,
@@ -73,8 +81,8 @@ const AttributionDashboard = ({ apiKey: initialApiKey, onConnect, onDisconnect,
73
81
  });
74
82
  }
75
83
  catch (e) {
76
- console.error(e);
77
- setError(e.message || "Failed to load live metrics via SDK. Verify your API token.");
84
+ const errMsg = e.response?.data?.error || e.message || "Failed to load live metrics via SDK. Verify your API token.";
85
+ setError(errMsg);
78
86
  setData(null);
79
87
  }
80
88
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boostyourleads/antigravity-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "BoostYourLeads SDK integration for custom AI agents and Antigravity.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",