@supyagent/sdk 0.1.12 → 0.1.13
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/prisma.cjs +18 -17
- package/dist/prisma.cjs.map +1 -1
- package/dist/prisma.js +18 -17
- package/dist/prisma.js.map +1 -1
- package/dist/react.cjs +160 -32
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +181 -44
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -357,9 +357,15 @@ function getSlidesSummary(data) {
|
|
|
357
357
|
return { text: "Slides result" };
|
|
358
358
|
}
|
|
359
359
|
function getHubspotSummary(data, toolName) {
|
|
360
|
-
const
|
|
361
|
-
const
|
|
362
|
-
|
|
360
|
+
const tl = toolName.toLowerCase();
|
|
361
|
+
const isDeal = tl.includes("deal");
|
|
362
|
+
const isCompany = tl.includes("compan");
|
|
363
|
+
const n = countItems(data, "results", "contacts", "companies", "deals");
|
|
364
|
+
if (n > 0) {
|
|
365
|
+
const label = isDeal ? "deals" : isCompany ? "companies" : "contacts";
|
|
366
|
+
return { text: `Listed ${n} ${label}`, badge: countBadge(n) };
|
|
367
|
+
}
|
|
368
|
+
if (isDeal) return { text: "Deal result" };
|
|
363
369
|
return { text: isCompany ? "Company result" : "Contact result" };
|
|
364
370
|
}
|
|
365
371
|
function getLinearSummary(data, toolName) {
|
|
@@ -1272,7 +1278,16 @@ function SlidesFormatter({ data }) {
|
|
|
1272
1278
|
}
|
|
1273
1279
|
|
|
1274
1280
|
// src/ui/formatters/hubspot.tsx
|
|
1275
|
-
import {
|
|
1281
|
+
import {
|
|
1282
|
+
Users as Users3,
|
|
1283
|
+
Building2,
|
|
1284
|
+
Mail as Mail3,
|
|
1285
|
+
Phone as Phone2,
|
|
1286
|
+
Globe,
|
|
1287
|
+
Briefcase as Briefcase2,
|
|
1288
|
+
DollarSign,
|
|
1289
|
+
Calendar as Calendar3
|
|
1290
|
+
} from "lucide-react";
|
|
1276
1291
|
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1277
1292
|
function isHubspotContact(data) {
|
|
1278
1293
|
if (typeof data !== "object" || data === null) return false;
|
|
@@ -1283,9 +1298,50 @@ function isHubspotContact(data) {
|
|
|
1283
1298
|
}
|
|
1284
1299
|
function isHubspotCompany(data) {
|
|
1285
1300
|
if (typeof data !== "object" || data === null) return false;
|
|
1286
|
-
const
|
|
1301
|
+
const d = data;
|
|
1302
|
+
if ("domain" in d && !("email" in d) && !("amount" in d)) return true;
|
|
1303
|
+
const props = d.properties;
|
|
1287
1304
|
return props && ("name" in props || "domain" in props);
|
|
1288
1305
|
}
|
|
1306
|
+
function isHubspotDeal(data) {
|
|
1307
|
+
if (typeof data !== "object" || data === null) return false;
|
|
1308
|
+
const d = data;
|
|
1309
|
+
return ("amount" in d || "stage" in d || "closeDate" in d) && !("email" in d);
|
|
1310
|
+
}
|
|
1311
|
+
function formatCurrency(value) {
|
|
1312
|
+
try {
|
|
1313
|
+
return new Intl.NumberFormat(void 0, {
|
|
1314
|
+
style: "currency",
|
|
1315
|
+
currency: "USD",
|
|
1316
|
+
minimumFractionDigits: 0,
|
|
1317
|
+
maximumFractionDigits: 0
|
|
1318
|
+
}).format(value);
|
|
1319
|
+
} catch {
|
|
1320
|
+
return `$${value.toLocaleString()}`;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
function formatDate(dateStr) {
|
|
1324
|
+
try {
|
|
1325
|
+
return new Date(dateStr).toLocaleDateString(void 0, {
|
|
1326
|
+
month: "short",
|
|
1327
|
+
day: "numeric",
|
|
1328
|
+
year: "numeric"
|
|
1329
|
+
});
|
|
1330
|
+
} catch {
|
|
1331
|
+
return dateStr;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
function getStageBadge(stage) {
|
|
1335
|
+
if (!stage) return null;
|
|
1336
|
+
const s = stage.toLowerCase();
|
|
1337
|
+
if (s === "closedwon" || s === "closed won")
|
|
1338
|
+
return { label: "Won", className: "text-green-500 bg-green-500/10" };
|
|
1339
|
+
if (s === "closedlost" || s === "closed lost")
|
|
1340
|
+
return { label: "Lost", className: "text-red-400 bg-red-400/10" };
|
|
1341
|
+
if (/^\d+$/.test(stage))
|
|
1342
|
+
return { label: "In Progress", className: "text-blue-400 bg-blue-400/10" };
|
|
1343
|
+
return { label: stage, className: "text-muted-foreground bg-muted" };
|
|
1344
|
+
}
|
|
1289
1345
|
function ContactCard({ contact }) {
|
|
1290
1346
|
const p = contact.properties || {};
|
|
1291
1347
|
const first = contact.firstName || p.firstname;
|
|
@@ -1316,59 +1372,140 @@ function ContactCard({ contact }) {
|
|
|
1316
1372
|
}
|
|
1317
1373
|
function CompanyCard({ company }) {
|
|
1318
1374
|
const p = company.properties || {};
|
|
1375
|
+
const name = company.name || p.name;
|
|
1376
|
+
const domain = company.domain || p.domain;
|
|
1377
|
+
const industry = company.industry || p.industry;
|
|
1378
|
+
const phone = p.phone;
|
|
1379
|
+
const employeeCount = company.employeeCount ?? (p.numberofemployees ? Number(p.numberofemployees) : null);
|
|
1319
1380
|
return /* @__PURE__ */ jsxs11("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
|
|
1320
1381
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-2", children: [
|
|
1321
1382
|
/* @__PURE__ */ jsx12(Building2, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
|
|
1322
1383
|
/* @__PURE__ */ jsxs11("div", { className: "min-w-0 flex-1", children: [
|
|
1323
|
-
/* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-foreground", children:
|
|
1324
|
-
|
|
1384
|
+
/* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-foreground", children: name || "Unknown company" }),
|
|
1385
|
+
industry && /* @__PURE__ */ jsx12("p", { className: "text-xs text-muted-foreground", children: industry })
|
|
1325
1386
|
] })
|
|
1326
1387
|
] }),
|
|
1327
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6", children: [
|
|
1328
|
-
|
|
1329
|
-
|
|
1388
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6 text-xs text-muted-foreground", children: [
|
|
1389
|
+
domain && /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-1", children: [
|
|
1390
|
+
/* @__PURE__ */ jsx12(Globe, { className: "h-3 w-3" }),
|
|
1391
|
+
domain
|
|
1392
|
+
] }),
|
|
1393
|
+
phone && /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-1", children: [
|
|
1330
1394
|
/* @__PURE__ */ jsx12(Phone2, { className: "h-3 w-3" }),
|
|
1331
|
-
|
|
1395
|
+
phone
|
|
1396
|
+
] }),
|
|
1397
|
+
employeeCount != null && employeeCount > 0 && /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-1", children: [
|
|
1398
|
+
/* @__PURE__ */ jsx12(Users3, { className: "h-3 w-3" }),
|
|
1399
|
+
employeeCount.toLocaleString(),
|
|
1400
|
+
" employees"
|
|
1401
|
+
] })
|
|
1402
|
+
] })
|
|
1403
|
+
] });
|
|
1404
|
+
}
|
|
1405
|
+
function DealCard({ deal }) {
|
|
1406
|
+
const stageBadge = getStageBadge(deal.stage);
|
|
1407
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
|
|
1408
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-start gap-2", children: [
|
|
1409
|
+
/* @__PURE__ */ jsx12(Briefcase2, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
|
|
1410
|
+
/* @__PURE__ */ jsxs11("div", { className: "min-w-0 flex-1", children: [
|
|
1411
|
+
/* @__PURE__ */ jsx12("p", { className: "text-sm font-medium text-foreground", children: deal.name || "Untitled deal" }),
|
|
1412
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
|
|
1413
|
+
deal.amount != null && /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
|
|
1414
|
+
/* @__PURE__ */ jsx12(DollarSign, { className: "h-3 w-3" }),
|
|
1415
|
+
formatCurrency(deal.amount)
|
|
1416
|
+
] }),
|
|
1417
|
+
stageBadge && /* @__PURE__ */ jsx12(
|
|
1418
|
+
"span",
|
|
1419
|
+
{
|
|
1420
|
+
className: `rounded-full px-2 py-0.5 text-xs ${stageBadge.className}`,
|
|
1421
|
+
children: stageBadge.label
|
|
1422
|
+
}
|
|
1423
|
+
)
|
|
1424
|
+
] })
|
|
1332
1425
|
] })
|
|
1426
|
+
] }),
|
|
1427
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap gap-x-4 gap-y-1 pl-6 text-xs text-muted-foreground", children: [
|
|
1428
|
+
deal.closeDate && /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-1", children: [
|
|
1429
|
+
/* @__PURE__ */ jsx12(Calendar3, { className: "h-3 w-3" }),
|
|
1430
|
+
"Close: ",
|
|
1431
|
+
formatDate(deal.closeDate)
|
|
1432
|
+
] }),
|
|
1433
|
+
deal.pipeline && deal.pipeline !== "default" && /* @__PURE__ */ jsx12("span", { children: deal.pipeline })
|
|
1333
1434
|
] })
|
|
1334
1435
|
] });
|
|
1335
1436
|
}
|
|
1437
|
+
function ListWrapper({
|
|
1438
|
+
children,
|
|
1439
|
+
hasMore
|
|
1440
|
+
}) {
|
|
1441
|
+
return /* @__PURE__ */ jsxs11("div", { className: "space-y-2", children: [
|
|
1442
|
+
children,
|
|
1443
|
+
hasMore && /* @__PURE__ */ jsx12("p", { className: "text-xs text-muted-foreground text-center pt-1", children: "More results available" })
|
|
1444
|
+
] });
|
|
1445
|
+
}
|
|
1446
|
+
function hasPaging(data) {
|
|
1447
|
+
if (typeof data !== "object" || data === null) return false;
|
|
1448
|
+
const paging = data.paging;
|
|
1449
|
+
return paging && typeof paging === "object" && paging.next;
|
|
1450
|
+
}
|
|
1336
1451
|
function HubspotFormatter({ data }) {
|
|
1337
1452
|
if (isHubspotContact(data)) {
|
|
1338
1453
|
return /* @__PURE__ */ jsx12(ContactCard, { contact: data });
|
|
1339
1454
|
}
|
|
1455
|
+
if (isHubspotDeal(data)) {
|
|
1456
|
+
return /* @__PURE__ */ jsx12(DealCard, { deal: data });
|
|
1457
|
+
}
|
|
1340
1458
|
if (isHubspotCompany(data)) {
|
|
1341
1459
|
return /* @__PURE__ */ jsx12(CompanyCard, { company: data });
|
|
1342
1460
|
}
|
|
1343
1461
|
if (Array.isArray(data)) {
|
|
1462
|
+
const deals = data.filter(isHubspotDeal);
|
|
1463
|
+
if (deals.length > 0) {
|
|
1464
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { children: deals.map((d, i) => /* @__PURE__ */ jsx12(DealCard, { deal: d }, d.id || i)) });
|
|
1465
|
+
}
|
|
1344
1466
|
const contacts = data.filter(isHubspotContact);
|
|
1345
1467
|
if (contacts.length > 0) {
|
|
1346
|
-
return /* @__PURE__ */ jsx12(
|
|
1468
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { children: contacts.map((c, i) => /* @__PURE__ */ jsx12(ContactCard, { contact: c }, c.id || i)) });
|
|
1347
1469
|
}
|
|
1348
1470
|
const companies = data.filter(isHubspotCompany);
|
|
1349
1471
|
if (companies.length > 0) {
|
|
1350
|
-
return /* @__PURE__ */ jsx12(
|
|
1472
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { children: companies.map((c, i) => /* @__PURE__ */ jsx12(CompanyCard, { company: c }, c.id || i)) });
|
|
1351
1473
|
}
|
|
1352
1474
|
}
|
|
1353
|
-
if (typeof data === "object" && data !== null
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1356
|
-
|
|
1475
|
+
if (typeof data === "object" && data !== null) {
|
|
1476
|
+
const d = data;
|
|
1477
|
+
const more = hasPaging(data);
|
|
1478
|
+
if ("contacts" in d && Array.isArray(d.contacts)) {
|
|
1479
|
+
const valid = d.contacts.filter(isHubspotContact);
|
|
1357
1480
|
if (valid.length > 0) {
|
|
1358
|
-
return /* @__PURE__ */ jsx12(
|
|
1481
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { hasMore: more, children: valid.map((c, i) => /* @__PURE__ */ jsx12(ContactCard, { contact: c }, c.id || i)) });
|
|
1359
1482
|
}
|
|
1360
1483
|
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1484
|
+
if ("companies" in d && Array.isArray(d.companies)) {
|
|
1485
|
+
const valid = d.companies.filter(isHubspotCompany);
|
|
1486
|
+
if (valid.length > 0) {
|
|
1487
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { hasMore: more, children: valid.map((c, i) => /* @__PURE__ */ jsx12(CompanyCard, { company: c }, c.id || i)) });
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
if ("deals" in d && Array.isArray(d.deals)) {
|
|
1491
|
+
const valid = d.deals.filter(isHubspotDeal);
|
|
1492
|
+
if (valid.length > 0) {
|
|
1493
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { hasMore: more, children: valid.map((deal, i) => /* @__PURE__ */ jsx12(DealCard, { deal }, deal.id || i)) });
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
if ("results" in d && Array.isArray(d.results)) {
|
|
1497
|
+
const results = d.results;
|
|
1498
|
+
const deals = results.filter(isHubspotDeal);
|
|
1499
|
+
if (deals.length > 0) {
|
|
1500
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { hasMore: more, children: deals.map((deal, i) => /* @__PURE__ */ jsx12(DealCard, { deal }, deal.id || i)) });
|
|
1501
|
+
}
|
|
1365
1502
|
const contacts = results.filter(isHubspotContact);
|
|
1366
1503
|
if (contacts.length > 0) {
|
|
1367
|
-
return /* @__PURE__ */ jsx12(
|
|
1504
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { hasMore: more, children: contacts.map((c, i) => /* @__PURE__ */ jsx12(ContactCard, { contact: c }, c.id || i)) });
|
|
1368
1505
|
}
|
|
1369
1506
|
const companies = results.filter(isHubspotCompany);
|
|
1370
1507
|
if (companies.length > 0) {
|
|
1371
|
-
return /* @__PURE__ */ jsx12(
|
|
1508
|
+
return /* @__PURE__ */ jsx12(ListWrapper, { hasMore: more, children: companies.map((c, i) => /* @__PURE__ */ jsx12(CompanyCard, { company: c }, c.id || i)) });
|
|
1372
1509
|
}
|
|
1373
1510
|
}
|
|
1374
1511
|
}
|
|
@@ -1486,12 +1623,12 @@ function LinearFormatter({ data }) {
|
|
|
1486
1623
|
}
|
|
1487
1624
|
|
|
1488
1625
|
// src/ui/formatters/pipedrive.tsx
|
|
1489
|
-
import { Briefcase as
|
|
1626
|
+
import { Briefcase as Briefcase3, DollarSign as DollarSign2 } from "lucide-react";
|
|
1490
1627
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1491
1628
|
function isPipedriveDeal(data) {
|
|
1492
1629
|
return typeof data === "object" && data !== null && ("title" in data || "value" in data || "status" in data) && !("subject" in data);
|
|
1493
1630
|
}
|
|
1494
|
-
function
|
|
1631
|
+
function formatCurrency2(value, currency) {
|
|
1495
1632
|
try {
|
|
1496
1633
|
return new Intl.NumberFormat(void 0, {
|
|
1497
1634
|
style: "currency",
|
|
@@ -1517,17 +1654,17 @@ function getStatusBadge(status) {
|
|
|
1517
1654
|
return status ? { label: status, className: "text-muted-foreground bg-muted" } : null;
|
|
1518
1655
|
}
|
|
1519
1656
|
}
|
|
1520
|
-
function
|
|
1657
|
+
function DealCard2({ deal }) {
|
|
1521
1658
|
const statusBadge = getStatusBadge(deal.status);
|
|
1522
1659
|
return /* @__PURE__ */ jsxs13("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
|
|
1523
1660
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-start gap-2", children: [
|
|
1524
|
-
/* @__PURE__ */ jsx14(
|
|
1661
|
+
/* @__PURE__ */ jsx14(Briefcase3, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
|
|
1525
1662
|
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
1526
1663
|
/* @__PURE__ */ jsx14("p", { className: "text-sm font-medium text-foreground", children: deal.title || "Untitled deal" }),
|
|
1527
1664
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
|
|
1528
1665
|
deal.value !== void 0 && /* @__PURE__ */ jsxs13("span", { className: "flex items-center gap-1 text-xs font-medium text-foreground", children: [
|
|
1529
|
-
/* @__PURE__ */ jsx14(
|
|
1530
|
-
|
|
1666
|
+
/* @__PURE__ */ jsx14(DollarSign2, { className: "h-3 w-3" }),
|
|
1667
|
+
formatCurrency2(deal.value, deal.currency)
|
|
1531
1668
|
] }),
|
|
1532
1669
|
statusBadge && /* @__PURE__ */ jsx14("span", { className: `rounded-full px-2 py-0.5 text-xs ${statusBadge.className}`, children: statusBadge.label })
|
|
1533
1670
|
] })
|
|
@@ -1542,12 +1679,12 @@ function DealCard({ deal }) {
|
|
|
1542
1679
|
}
|
|
1543
1680
|
function PipedriveFormatter({ data }) {
|
|
1544
1681
|
if (isPipedriveDeal(data)) {
|
|
1545
|
-
return /* @__PURE__ */ jsx14(
|
|
1682
|
+
return /* @__PURE__ */ jsx14(DealCard2, { deal: data });
|
|
1546
1683
|
}
|
|
1547
1684
|
if (Array.isArray(data)) {
|
|
1548
1685
|
const deals = data.filter(isPipedriveDeal);
|
|
1549
1686
|
if (deals.length > 0) {
|
|
1550
|
-
return /* @__PURE__ */ jsx14("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ jsx14(
|
|
1687
|
+
return /* @__PURE__ */ jsx14("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ jsx14(DealCard2, { deal }, deal.id || i)) });
|
|
1551
1688
|
}
|
|
1552
1689
|
}
|
|
1553
1690
|
if (typeof data === "object" && data !== null && "deals" in data) {
|
|
@@ -1555,14 +1692,14 @@ function PipedriveFormatter({ data }) {
|
|
|
1555
1692
|
if (Array.isArray(items)) {
|
|
1556
1693
|
const deals = items.filter(isPipedriveDeal);
|
|
1557
1694
|
if (deals.length > 0) {
|
|
1558
|
-
return /* @__PURE__ */ jsx14("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ jsx14(
|
|
1695
|
+
return /* @__PURE__ */ jsx14("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ jsx14(DealCard2, { deal }, deal.id || i)) });
|
|
1559
1696
|
}
|
|
1560
1697
|
}
|
|
1561
1698
|
}
|
|
1562
1699
|
if (typeof data === "object" && data !== null && "deal" in data) {
|
|
1563
1700
|
const item = data.deal;
|
|
1564
1701
|
if (isPipedriveDeal(item)) {
|
|
1565
|
-
return /* @__PURE__ */ jsx14(
|
|
1702
|
+
return /* @__PURE__ */ jsx14(DealCard2, { deal: item });
|
|
1566
1703
|
}
|
|
1567
1704
|
}
|
|
1568
1705
|
if (typeof data === "object" && data !== null && "data" in data) {
|
|
@@ -1570,11 +1707,11 @@ function PipedriveFormatter({ data }) {
|
|
|
1570
1707
|
if (Array.isArray(items)) {
|
|
1571
1708
|
const deals = items.filter(isPipedriveDeal);
|
|
1572
1709
|
if (deals.length > 0) {
|
|
1573
|
-
return /* @__PURE__ */ jsx14("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ jsx14(
|
|
1710
|
+
return /* @__PURE__ */ jsx14("div", { className: "space-y-2", children: deals.map((deal, i) => /* @__PURE__ */ jsx14(DealCard2, { deal }, deal.id || i)) });
|
|
1574
1711
|
}
|
|
1575
1712
|
}
|
|
1576
1713
|
if (isPipedriveDeal(items)) {
|
|
1577
|
-
return /* @__PURE__ */ jsx14(
|
|
1714
|
+
return /* @__PURE__ */ jsx14(DealCard2, { deal: items });
|
|
1578
1715
|
}
|
|
1579
1716
|
}
|
|
1580
1717
|
return /* @__PURE__ */ jsx14("pre", { className: "rounded-lg border border-border bg-background p-3 text-xs text-foreground overflow-x-auto max-h-96 overflow-y-auto", children: JSON.stringify(data, null, 2) });
|
|
@@ -1693,7 +1830,7 @@ function ResendFormatter({ data }) {
|
|
|
1693
1830
|
}
|
|
1694
1831
|
|
|
1695
1832
|
// src/ui/formatters/inbox.tsx
|
|
1696
|
-
import { Bell as Bell2, Calendar as
|
|
1833
|
+
import { Bell as Bell2, Calendar as Calendar4, Mail as Mail4, MessageSquare as MessageSquare3 } from "lucide-react";
|
|
1697
1834
|
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1698
1835
|
function isInboxEvent(data) {
|
|
1699
1836
|
if (typeof data !== "object" || data === null) return false;
|
|
@@ -1714,7 +1851,7 @@ function getEventIcon(type) {
|
|
|
1714
1851
|
case "message":
|
|
1715
1852
|
return MessageSquare3;
|
|
1716
1853
|
case "calendar":
|
|
1717
|
-
return
|
|
1854
|
+
return Calendar4;
|
|
1718
1855
|
default:
|
|
1719
1856
|
return Bell2;
|
|
1720
1857
|
}
|
|
@@ -2364,7 +2501,7 @@ function JiraFormatter({ data }) {
|
|
|
2364
2501
|
}
|
|
2365
2502
|
|
|
2366
2503
|
// src/ui/formatters/salesforce.tsx
|
|
2367
|
-
import { User as User4, Briefcase as
|
|
2504
|
+
import { User as User4, Briefcase as Briefcase4, Mail as Mail5, Phone as Phone3, Building2 as Building22, Calendar as Calendar5 } from "lucide-react";
|
|
2368
2505
|
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2369
2506
|
function isContact(data) {
|
|
2370
2507
|
if (typeof data !== "object" || data === null) return false;
|
|
@@ -2403,14 +2540,14 @@ function ContactCard2({ contact }) {
|
|
|
2403
2540
|
function OpportunityCard({ opp }) {
|
|
2404
2541
|
return /* @__PURE__ */ jsxs23("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1.5", children: [
|
|
2405
2542
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-start gap-2", children: [
|
|
2406
|
-
/* @__PURE__ */ jsx24(
|
|
2543
|
+
/* @__PURE__ */ jsx24(Briefcase4, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
|
|
2407
2544
|
/* @__PURE__ */ jsxs23("div", { className: "min-w-0 flex-1", children: [
|
|
2408
2545
|
/* @__PURE__ */ jsx24("p", { className: "text-sm font-medium text-foreground", children: opp.Name }),
|
|
2409
2546
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 mt-0.5 flex-wrap", children: [
|
|
2410
2547
|
opp.Amount !== void 0 && /* @__PURE__ */ jsx24("span", { className: "text-xs font-medium text-foreground", children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(opp.Amount) }),
|
|
2411
2548
|
opp.StageName && /* @__PURE__ */ jsx24("span", { className: "rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: opp.StageName }),
|
|
2412
2549
|
opp.CloseDate && /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
2413
|
-
/* @__PURE__ */ jsx24(
|
|
2550
|
+
/* @__PURE__ */ jsx24(Calendar5, { className: "h-3 w-3" }),
|
|
2414
2551
|
opp.CloseDate
|
|
2415
2552
|
] })
|
|
2416
2553
|
] })
|
|
@@ -2549,7 +2686,7 @@ function BrevoFormatter({ data }) {
|
|
|
2549
2686
|
}
|
|
2550
2687
|
|
|
2551
2688
|
// src/ui/formatters/calendly.tsx
|
|
2552
|
-
import { Calendar as
|
|
2689
|
+
import { Calendar as Calendar6, Clock as Clock7, MapPin as MapPin2 } from "lucide-react";
|
|
2553
2690
|
import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2554
2691
|
function isCalendlyEvent(data) {
|
|
2555
2692
|
return typeof data === "object" && data !== null && "name" in data && ("start_time" in data || "status" in data);
|
|
@@ -2575,7 +2712,7 @@ var STATUS_STYLES3 = {
|
|
|
2575
2712
|
};
|
|
2576
2713
|
function EventCard3({ event }) {
|
|
2577
2714
|
return /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-border bg-card p-3 space-y-1", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-2", children: [
|
|
2578
|
-
/* @__PURE__ */ jsx26(
|
|
2715
|
+
/* @__PURE__ */ jsx26(Calendar6, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
|
|
2579
2716
|
/* @__PURE__ */ jsxs25("div", { className: "min-w-0 flex-1", children: [
|
|
2580
2717
|
/* @__PURE__ */ jsx26("p", { className: "text-sm font-medium text-foreground", children: event.name }),
|
|
2581
2718
|
event.start_time && /* @__PURE__ */ jsxs25("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
@@ -2593,7 +2730,7 @@ function EventCard3({ event }) {
|
|
|
2593
2730
|
}
|
|
2594
2731
|
function EventTypeCard({ eventType }) {
|
|
2595
2732
|
return /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-border bg-card p-3", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-2", children: [
|
|
2596
|
-
/* @__PURE__ */ jsx26(
|
|
2733
|
+
/* @__PURE__ */ jsx26(Calendar6, { className: "h-4 w-4 text-muted-foreground mt-0.5 shrink-0" }),
|
|
2597
2734
|
/* @__PURE__ */ jsxs25("div", { className: "min-w-0 flex-1", children: [
|
|
2598
2735
|
/* @__PURE__ */ jsx26("p", { className: "text-sm font-medium text-foreground", children: eventType.name }),
|
|
2599
2736
|
eventType.description_plain && /* @__PURE__ */ jsx26("p", { className: "text-xs text-muted-foreground line-clamp-2", children: eventType.description_plain }),
|