outbound-sdk 0.11.0 → 0.12.0
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/alerts/index.js +1 -1
- package/dist/cards/index.js +201 -92
- package/dist/cards/sender-tool-cards.d.ts +6 -0
- package/dist/chunks/{chunk-MEEJIIIA.js → chunk-2ADIGC2N.js} +77 -8
- package/dist/chunks/{chunk-V7JKTNRO.js → chunk-3DDYXUDG.js} +1 -1
- package/dist/chunks/{chunk-UAHYPASH.js → chunk-3LRIWQEJ.js} +2 -1
- package/dist/chunks/{chunk-UZLFZZ2U.js → chunk-AWNH4I5D.js} +11 -2
- package/dist/chunks/{chunk-A7DLJUA6.js → chunk-B72F56HF.js} +3 -1
- package/dist/chunks/{chunk-KMQHXFIZ.js → chunk-CTRYCW4G.js} +648 -182
- package/dist/chunks/{chunk-OVTYA3IB.js → chunk-HDTOGEVN.js} +532 -182
- package/dist/chunks/{chunk-POBAY3TI.js → chunk-HXCZMMSD.js} +21 -0
- package/dist/chunks/chunk-I7GBBHD2.js +80 -0
- package/dist/chunks/{chunk-FTK4JS65.js → chunk-KNWJIJVO.js} +73 -4
- package/dist/chunks/{chunk-UOJG4VYF.js → chunk-LD5OAELW.js} +1 -1
- package/dist/chunks/{chunk-YFJ3OQZS.js → chunk-OPLXELPS.js} +5 -1
- package/dist/chunks/{chunk-CVLGFVDC.js → chunk-UIINRLHQ.js} +11 -7
- package/dist/chunks/{chunk-OMCDMELK.js → chunk-UWNQEQIX.js} +1 -1
- package/dist/chunks/{chunk-MPE6VLLY.js → chunk-UZ4YWUZ7.js} +1 -1
- package/dist/chunks/{tools-AVJ3XJ5A.js → tools-EKLZKXZU.js} +5 -4
- package/dist/cli/bin.js +11 -10
- package/dist/cli/index.js +10 -9
- package/dist/combine/index.js +36 -2
- package/dist/emailbison/index.js +4 -4
- package/dist/fixtures/index.js +4 -4
- package/dist/heyreach/index.js +14 -6
- package/dist/identity/index.js +46 -11
- package/dist/identity/keys.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/insights/define.d.ts +1 -1
- package/dist/insights/index.js +5 -4
- package/dist/insights/inputs.generated.d.ts +68 -5
- package/dist/insights/ops/channel-mix.d.ts +8 -1
- package/dist/insights/ops/period-comparison.d.ts +13 -2
- package/dist/insights/ops/shared.d.ts +11 -1
- package/dist/insights/ops/tag-rollup.d.ts +8 -1
- package/dist/insights/people/dropped-replies-check.d.ts +14 -2
- package/dist/insights/people/find.d.ts +5 -4
- package/dist/insights/people/hot-leads.d.ts +10 -1
- package/dist/insights/people/index.d.ts +26 -2
- package/dist/insights/people/person-summary.d.ts +15 -3
- package/dist/insights/people/thread-context.d.ts +79 -0
- package/dist/insights/people/thread-contexts.d.ts +59 -0
- package/dist/insights/people/thread-read.d.ts +22 -0
- package/dist/insights/registry.d.ts +25 -3
- package/dist/insights/senders/domain-health.d.ts +1 -1
- package/dist/insights/senders/index.d.ts +1 -1
- package/dist/insights/senders/read.d.ts +9 -0
- package/dist/instantly/adapter.d.ts +3 -2
- package/dist/instantly/capabilities.d.ts +5 -0
- package/dist/instantly/index.js +148 -45
- package/dist/instantly/senders.d.ts +3 -0
- package/dist/internal/adapter.d.ts +7 -0
- package/dist/internal/capabilities.d.ts +8 -0
- package/dist/internal/entities.d.ts +20 -0
- package/dist/internal/fields.d.ts +8 -0
- package/dist/internal/outbound/api.d.ts +12 -0
- package/dist/internal/outbound/operations-account.d.ts +4 -1
- package/dist/internal/outbound/outbound.d.ts +2 -1
- package/dist/internal/outbound/specs-account.d.ts +2 -1
- package/dist/internal/person.d.ts +32 -0
- package/dist/internal/records.d.ts +2 -2
- package/dist/internal/url.d.ts +2 -1
- package/dist/loader/index.js +1 -1
- package/dist/memory/data.d.ts +2 -1
- package/dist/memory/index.js +6 -4
- package/dist/redact/index.js +3 -3
- package/dist/smartlead/index.js +18 -7
- package/dist/tools/account-tools.d.ts +0 -5
- package/dist/tools/ai-sdk.js +5 -3
- package/dist/tools/campaign-tools.d.ts +0 -4
- package/dist/tools/claude-agent.js +5 -3
- package/dist/tools/deliverability-check.d.ts +9 -0
- package/dist/tools/index.js +6 -4
- package/dist/tools/people-tools.d.ts +4 -1
- package/dist/tools/person-input.d.ts +17 -0
- package/dist/tools/sender-health.d.ts +8 -0
- package/dist/tools/sender-impact.d.ts +38 -0
- package/dist/tools/shared.d.ts +5 -0
- package/dist/webhooks/index.js +6 -6
- package/package.json +1 -1
- /package/dist/chunks/{chunk-5XLR6XVV.js → chunk-TOZKA7JR.js} +0 -0
package/dist/alerts/index.js
CHANGED
package/dist/cards/index.js
CHANGED
|
@@ -962,6 +962,56 @@ var hotLeads = (data) => {
|
|
|
962
962
|
title: "Hot leads"
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
|
+
var FOLLOW_UP = /* @__PURE__ */ new Map([
|
|
966
|
+
["answered", "Answered"],
|
|
967
|
+
["automatic", "Automatic reply last"],
|
|
968
|
+
["inbound_unanswered", "Reply owed"],
|
|
969
|
+
["meeting", "Meeting recorded"],
|
|
970
|
+
["no_messages", "No messages"],
|
|
971
|
+
["not_read", "Not read"]
|
|
972
|
+
]);
|
|
973
|
+
var threadContext = (data) => {
|
|
974
|
+
const coverage = child(data, "coverage");
|
|
975
|
+
const threads = rows(data, "threads");
|
|
976
|
+
const unchecked = rows(coverage, "unchecked").length;
|
|
977
|
+
const remaining = num(coverage, "remaining") ?? 0;
|
|
978
|
+
const owed = threads.filter(
|
|
979
|
+
(thread) => bool(child(thread, "followUp"), "needed") === true
|
|
980
|
+
).length;
|
|
981
|
+
return {
|
|
982
|
+
bullets: [
|
|
983
|
+
...unchecked > 0 ? [`\u{1F7E1} Could not read ${plural(unchecked, "conversation")}.`] : [],
|
|
984
|
+
...remaining > 0 ? [`\u{1F7E1} ${plural(remaining, "conversation")} left for the next page.`] : [],
|
|
985
|
+
"Rules read who wrote last and when, never the words: read the latest message before acting."
|
|
986
|
+
],
|
|
987
|
+
finding: verdict(
|
|
988
|
+
num(coverage, "checked"),
|
|
989
|
+
owed === 0 ? null : `\u{1F534} The latest message is inbound and unanswered in ${plural(owed, "conversation")}.`,
|
|
990
|
+
"No conversation read ends with an unanswered inbound message."
|
|
991
|
+
),
|
|
992
|
+
stats: [
|
|
993
|
+
["Requested", int(num(coverage, "requested"))],
|
|
994
|
+
["Read", int(num(coverage, "checked"))],
|
|
995
|
+
["Found", int(num(coverage, "found"))],
|
|
996
|
+
["Could not read", int(unchecked)]
|
|
997
|
+
],
|
|
998
|
+
table: {
|
|
999
|
+
align: [LEFT, LEFT, LEFT, LEFT],
|
|
1000
|
+
cards: { subtitle: [1, 2], title: 0 },
|
|
1001
|
+
headers: ["Lead or thread", "Latest message", "Meeting", "Follow-up"],
|
|
1002
|
+
rows: threads.map((thread) => {
|
|
1003
|
+
const latest = child(child(thread, "activity"), "latest");
|
|
1004
|
+
return [
|
|
1005
|
+
str(thread, "email") ?? str(thread, "linkedinUrl") ?? str(thread, "lead") ?? show(child(thread, "target"), "id"),
|
|
1006
|
+
str(latest, "sentAt") === null ? DASH : `${str(latest, "direction") === "in" ? "Inbound" : "Outbound"}, ${day(str(latest, "sentAt"))}`,
|
|
1007
|
+
words(show(thread, "meeting")),
|
|
1008
|
+
FOLLOW_UP.get(str(child(thread, "followUp"), "basis") ?? "") ?? DASH
|
|
1009
|
+
];
|
|
1010
|
+
})
|
|
1011
|
+
},
|
|
1012
|
+
title: "Conversations"
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
965
1015
|
var personalizationGaps = (data) => {
|
|
966
1016
|
const totals = child(data, "totals");
|
|
967
1017
|
const affected = num(totals, "leadsAffected") ?? 0;
|
|
@@ -1004,7 +1054,8 @@ var PEOPLE_CARDS = /* @__PURE__ */ new Map([
|
|
|
1004
1054
|
["lead_collisions", leadCollisions],
|
|
1005
1055
|
["person_summary", personSummary],
|
|
1006
1056
|
["personalization_gaps", personalizationGaps],
|
|
1007
|
-
["suppression_check", suppressionCheck]
|
|
1057
|
+
["suppression_check", suppressionCheck],
|
|
1058
|
+
["thread_context", threadContext]
|
|
1008
1059
|
]);
|
|
1009
1060
|
|
|
1010
1061
|
// src/cards/sender-cards.ts
|
|
@@ -1316,9 +1367,153 @@ var buildSpec = (frame) => {
|
|
|
1316
1367
|
return { elements, root: "card" };
|
|
1317
1368
|
};
|
|
1318
1369
|
|
|
1319
|
-
// src/cards/tool-cards.ts
|
|
1370
|
+
// src/cards/sender-tool-cards.ts
|
|
1320
1371
|
var RIGHT2 = "right";
|
|
1321
1372
|
var LEFT2 = "left";
|
|
1373
|
+
var warmup = (sender) => {
|
|
1374
|
+
const score = num(sender, "warmup_score");
|
|
1375
|
+
if (score !== null) {
|
|
1376
|
+
return int(score);
|
|
1377
|
+
}
|
|
1378
|
+
const enabled = bool(sender, "warmup_enabled");
|
|
1379
|
+
if (enabled === null) {
|
|
1380
|
+
return DASH;
|
|
1381
|
+
}
|
|
1382
|
+
return enabled ? "On" : "Off";
|
|
1383
|
+
};
|
|
1384
|
+
var impactLine = (sender) => {
|
|
1385
|
+
if (!isJsonObject(field(sender, "impact"))) {
|
|
1386
|
+
return "";
|
|
1387
|
+
}
|
|
1388
|
+
const impact = child(sender, "impact");
|
|
1389
|
+
const campaigns = rows(impact, "active_campaigns");
|
|
1390
|
+
const count2 = num(impact, "active_campaign_count");
|
|
1391
|
+
const sent = num(child(impact, "recent_sends"), "sent");
|
|
1392
|
+
const last = str(impact, "last_sent_on");
|
|
1393
|
+
const parts = [
|
|
1394
|
+
count2 === null ? "active campaigns unknown" : `${plural(count2, "active campaign")}${campaigns.length === 0 ? "" : ` (${campaigns.map((campaign) => show(campaign, "name")).join(", ")})`}`,
|
|
1395
|
+
sent === null ? "recent sends unknown" : `${int(sent)} sent in 14 days`,
|
|
1396
|
+
...last === null ? [] : [`last sent ${last}`]
|
|
1397
|
+
];
|
|
1398
|
+
return `: ${parts.join(", ")}`;
|
|
1399
|
+
};
|
|
1400
|
+
var who = (sender) => str(sender, "address") ?? str(sender, "name") ?? "A LinkedIn seat";
|
|
1401
|
+
var failingBullets = (senders) => senders.flatMap(
|
|
1402
|
+
(sender) => isJsonObject(field(sender, "impact")) ? [
|
|
1403
|
+
`\u{1F534} **${who(sender)}** (${show(sender, "status")})${impactLine(sender)}`
|
|
1404
|
+
] : []
|
|
1405
|
+
);
|
|
1406
|
+
var senderHealth = (data) => {
|
|
1407
|
+
const senders = rows(data, "senders");
|
|
1408
|
+
const unhealthy = num(data, "unhealthy") ?? 0;
|
|
1409
|
+
const checked = num(data, "checked") ?? senders.length;
|
|
1410
|
+
const failing = num(data, "failing");
|
|
1411
|
+
const stats = [
|
|
1412
|
+
["Senders checked", int(checked)],
|
|
1413
|
+
["Not active", int(unhealthy)],
|
|
1414
|
+
...failing === null ? [] : [["Failing", int(failing)]]
|
|
1415
|
+
];
|
|
1416
|
+
return {
|
|
1417
|
+
bullets: failingBullets(senders),
|
|
1418
|
+
finding: verdict(
|
|
1419
|
+
checked,
|
|
1420
|
+
unhealthy === 0 ? null : `\u{1F534} ${int(unhealthy)} of ${plural(checked, "sender")} ${unhealthy === 1 ? "needs" : "need"} attention.`,
|
|
1421
|
+
`No sender needs attention (${int(checked)} checked).`
|
|
1422
|
+
),
|
|
1423
|
+
stats,
|
|
1424
|
+
table: {
|
|
1425
|
+
align: [LEFT2, LEFT2, LEFT2, RIGHT2, RIGHT2],
|
|
1426
|
+
headers: ["Sender", "Kind", "Status", "Daily limit", "Warmup"],
|
|
1427
|
+
rows: senders.map((sender) => [
|
|
1428
|
+
str(sender, "address") ?? show(sender, "sender"),
|
|
1429
|
+
show(sender, "kind"),
|
|
1430
|
+
show(sender, "status"),
|
|
1431
|
+
int(num(sender, "daily_limit")),
|
|
1432
|
+
warmup(sender)
|
|
1433
|
+
]),
|
|
1434
|
+
// The more count covers every sender checked, not only those in the answer.
|
|
1435
|
+
total: checked
|
|
1436
|
+
},
|
|
1437
|
+
title: "Sender health"
|
|
1438
|
+
};
|
|
1439
|
+
};
|
|
1440
|
+
var dns = (sender, record) => {
|
|
1441
|
+
const passes = bool(child(sender, "dns"), record);
|
|
1442
|
+
if (passes === null) {
|
|
1443
|
+
return DASH;
|
|
1444
|
+
}
|
|
1445
|
+
return passes ? "\u2713" : "\u2717";
|
|
1446
|
+
};
|
|
1447
|
+
var coverageStats = (data) => {
|
|
1448
|
+
if (!isJsonObject(field(data, "coverage"))) {
|
|
1449
|
+
return [];
|
|
1450
|
+
}
|
|
1451
|
+
const coverage = child(data, "coverage");
|
|
1452
|
+
const byReason = child(coverage, "not_checked_by_reason");
|
|
1453
|
+
return [
|
|
1454
|
+
["Checked in full", int(num(coverage, "checked"))],
|
|
1455
|
+
["Not checked", int(num(coverage, "not_checked"))],
|
|
1456
|
+
...["cap", "unsupported", "error"].flatMap((reason) => {
|
|
1457
|
+
const amount = num(byReason, reason) ?? 0;
|
|
1458
|
+
return amount === 0 ? [] : [[`Not checked: ${reason}`, int(amount)]];
|
|
1459
|
+
})
|
|
1460
|
+
];
|
|
1461
|
+
};
|
|
1462
|
+
var deliverabilityCheck = (data) => {
|
|
1463
|
+
const senders = rows(data, "senders");
|
|
1464
|
+
const broken = num(data, "with_problems") ?? 0;
|
|
1465
|
+
const screened = num(data, "screened") ?? senders.length;
|
|
1466
|
+
return {
|
|
1467
|
+
bullets: senders.flatMap((sender) => {
|
|
1468
|
+
const problems = strings(sender, "problems");
|
|
1469
|
+
return problems.length === 0 ? [] : [
|
|
1470
|
+
`\u{1F534} **${show(sender, "address")}**: ${problems.join("; ")}${impactLine(sender)}`
|
|
1471
|
+
];
|
|
1472
|
+
}),
|
|
1473
|
+
finding: verdict(
|
|
1474
|
+
screened,
|
|
1475
|
+
broken === 0 ? null : `\u{1F534} ${int(broken)} of ${plural(screened, "sender")} ${noun(broken, "has", "have")} a problem.`,
|
|
1476
|
+
`No problem found on ${plural(screened, "sender")}.`
|
|
1477
|
+
),
|
|
1478
|
+
stats: coverageStats(data),
|
|
1479
|
+
table: {
|
|
1480
|
+
align: [LEFT2, "center", "center", "center", "center", LEFT2, RIGHT2],
|
|
1481
|
+
headers: [
|
|
1482
|
+
"Sender",
|
|
1483
|
+
"SPF",
|
|
1484
|
+
"DKIM",
|
|
1485
|
+
"DMARC",
|
|
1486
|
+
"MX",
|
|
1487
|
+
"Signed in",
|
|
1488
|
+
"Spam rate"
|
|
1489
|
+
],
|
|
1490
|
+
rows: senders.map(
|
|
1491
|
+
(sender) => bool(sender, "checked") === false ? [
|
|
1492
|
+
show(sender, "address"),
|
|
1493
|
+
DASH,
|
|
1494
|
+
DASH,
|
|
1495
|
+
DASH,
|
|
1496
|
+
DASH,
|
|
1497
|
+
`not checked (${show(child(sender, "not_checked"), "reason")})`,
|
|
1498
|
+
DASH
|
|
1499
|
+
] : [
|
|
1500
|
+
show(sender, "address"),
|
|
1501
|
+
dns(sender, "spf"),
|
|
1502
|
+
dns(sender, "dkim"),
|
|
1503
|
+
dns(sender, "dmarc"),
|
|
1504
|
+
dns(sender, "mx"),
|
|
1505
|
+
yesNo(bool(sender, "connected")),
|
|
1506
|
+
pct(num(sender, "warmup_spam_rate"))
|
|
1507
|
+
]
|
|
1508
|
+
)
|
|
1509
|
+
},
|
|
1510
|
+
title: "Deliverability check"
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
// src/cards/tool-cards.ts
|
|
1515
|
+
var RIGHT3 = "right";
|
|
1516
|
+
var LEFT3 = "left";
|
|
1322
1517
|
var metricCells = (metrics) => [
|
|
1323
1518
|
int(num(metrics, "sent")),
|
|
1324
1519
|
int(num(metrics, "replied")),
|
|
@@ -1347,7 +1542,7 @@ var campaignOverview = (data) => {
|
|
|
1347
1542
|
finding: top === void 0 ? "No campaign has a reply rate yet." : `${show(top, "name")} leads at ${pct(rate(top))} reply rate.`,
|
|
1348
1543
|
subtitle: plural(campaigns.length, "campaign"),
|
|
1349
1544
|
table: {
|
|
1350
|
-
align: [
|
|
1545
|
+
align: [LEFT3, RIGHT3, RIGHT3, RIGHT3, RIGHT3, RIGHT3],
|
|
1351
1546
|
headers: [
|
|
1352
1547
|
"Campaign",
|
|
1353
1548
|
"Sent",
|
|
@@ -1401,7 +1596,7 @@ var winningSteps = (data) => {
|
|
|
1401
1596
|
finding: top === void 0 ? "The vendor reports no reply rate by step for this campaign." : `Step ${stepOf(top, "step")}${str(top, "variant") === null ? "" : ` variant ${show(top, "variant")}`} leads at ${pct(num(child(top, "metrics"), "reply_rate"))}.`,
|
|
1402
1597
|
subtitle: show(data, "campaign"),
|
|
1403
1598
|
table: {
|
|
1404
|
-
align: [
|
|
1599
|
+
align: [LEFT3, LEFT3, RIGHT3, RIGHT3, RIGHT3],
|
|
1405
1600
|
headers: ["Step", "Variant", "Sent", "Replies", "Reply rate"],
|
|
1406
1601
|
rows: steps.map((each) => {
|
|
1407
1602
|
const metrics = child(each, "metrics");
|
|
@@ -1417,47 +1612,6 @@ var winningSteps = (data) => {
|
|
|
1417
1612
|
title: "Winning steps"
|
|
1418
1613
|
};
|
|
1419
1614
|
};
|
|
1420
|
-
var warmup = (sender) => {
|
|
1421
|
-
const score = num(sender, "warmup_score");
|
|
1422
|
-
if (score !== null) {
|
|
1423
|
-
return int(score);
|
|
1424
|
-
}
|
|
1425
|
-
const enabled = bool(sender, "warmup_enabled");
|
|
1426
|
-
if (enabled === null) {
|
|
1427
|
-
return DASH;
|
|
1428
|
-
}
|
|
1429
|
-
return enabled ? "On" : "Off";
|
|
1430
|
-
};
|
|
1431
|
-
var senderHealth = (data) => {
|
|
1432
|
-
const senders = rows(data, "senders");
|
|
1433
|
-
const unhealthy = num(data, "unhealthy") ?? 0;
|
|
1434
|
-
const checked = num(data, "checked") ?? senders.length;
|
|
1435
|
-
return {
|
|
1436
|
-
finding: verdict(
|
|
1437
|
-
checked,
|
|
1438
|
-
unhealthy === 0 ? null : `\u{1F534} ${int(unhealthy)} of ${plural(checked, "sender")} ${unhealthy === 1 ? "needs" : "need"} attention.`,
|
|
1439
|
-
`No sender needs attention (${int(checked)} checked).`
|
|
1440
|
-
),
|
|
1441
|
-
stats: [
|
|
1442
|
-
["Senders checked", int(checked)],
|
|
1443
|
-
["Not active", int(unhealthy)]
|
|
1444
|
-
],
|
|
1445
|
-
table: {
|
|
1446
|
-
align: [LEFT2, LEFT2, LEFT2, RIGHT2, RIGHT2],
|
|
1447
|
-
headers: ["Sender", "Kind", "Status", "Daily limit", "Warmup"],
|
|
1448
|
-
rows: senders.map((sender) => [
|
|
1449
|
-
str(sender, "address") ?? show(sender, "sender"),
|
|
1450
|
-
show(sender, "kind"),
|
|
1451
|
-
show(sender, "status"),
|
|
1452
|
-
int(num(sender, "daily_limit")),
|
|
1453
|
-
warmup(sender)
|
|
1454
|
-
]),
|
|
1455
|
-
// The more count covers every sender checked, not only those in the answer.
|
|
1456
|
-
total: checked
|
|
1457
|
-
},
|
|
1458
|
-
title: "Sender health"
|
|
1459
|
-
};
|
|
1460
|
-
};
|
|
1461
1615
|
var quote = (body) => {
|
|
1462
1616
|
const content = str(body, "untrusted_content");
|
|
1463
1617
|
return content === null ? "" : `
|
|
@@ -1512,7 +1666,7 @@ var compareClients = (data) => {
|
|
|
1512
1666
|
),
|
|
1513
1667
|
subtitle: plural(clients.length, "client"),
|
|
1514
1668
|
table: {
|
|
1515
|
-
align: [
|
|
1669
|
+
align: [LEFT3, RIGHT3, RIGHT3, RIGHT3, RIGHT3, RIGHT3],
|
|
1516
1670
|
headers: [
|
|
1517
1671
|
"Client",
|
|
1518
1672
|
"Campaigns",
|
|
@@ -1579,57 +1733,12 @@ var campaignSetup = (data) => ({
|
|
|
1579
1733
|
subtitle: show(data, "campaign"),
|
|
1580
1734
|
title: "Campaign setup"
|
|
1581
1735
|
});
|
|
1582
|
-
var dns = (sender, record) => {
|
|
1583
|
-
const passes = bool(child(sender, "dns"), record);
|
|
1584
|
-
if (passes === null) {
|
|
1585
|
-
return DASH;
|
|
1586
|
-
}
|
|
1587
|
-
return passes ? "\u2713" : "\u2717";
|
|
1588
|
-
};
|
|
1589
|
-
var deliverabilityCheck = (data) => {
|
|
1590
|
-
const senders = rows(data, "senders");
|
|
1591
|
-
const broken = num(data, "with_problems") ?? 0;
|
|
1592
|
-
const screened = num(data, "screened") ?? senders.length;
|
|
1593
|
-
return {
|
|
1594
|
-
bullets: senders.flatMap((sender) => {
|
|
1595
|
-
const problems = strings(sender, "problems");
|
|
1596
|
-
return problems.length === 0 ? [] : [`\u{1F534} **${show(sender, "address")}**: ${problems.join("; ")}`];
|
|
1597
|
-
}),
|
|
1598
|
-
finding: verdict(
|
|
1599
|
-
screened,
|
|
1600
|
-
broken === 0 ? null : `\u{1F534} ${int(broken)} of ${plural(screened, "sender")} ${noun(broken, "has", "have")} a problem.`,
|
|
1601
|
-
`No problem found on ${plural(screened, "sender")}.`
|
|
1602
|
-
),
|
|
1603
|
-
table: {
|
|
1604
|
-
align: [LEFT2, "center", "center", "center", "center", LEFT2, RIGHT2],
|
|
1605
|
-
headers: [
|
|
1606
|
-
"Sender",
|
|
1607
|
-
"SPF",
|
|
1608
|
-
"DKIM",
|
|
1609
|
-
"DMARC",
|
|
1610
|
-
"MX",
|
|
1611
|
-
"Signed in",
|
|
1612
|
-
"Spam rate"
|
|
1613
|
-
],
|
|
1614
|
-
rows: senders.map((sender) => [
|
|
1615
|
-
show(sender, "address"),
|
|
1616
|
-
dns(sender, "spf"),
|
|
1617
|
-
dns(sender, "dkim"),
|
|
1618
|
-
dns(sender, "dmarc"),
|
|
1619
|
-
dns(sender, "mx"),
|
|
1620
|
-
yesNo(bool(sender, "connected")),
|
|
1621
|
-
pct(num(sender, "warmup_spam_rate"))
|
|
1622
|
-
])
|
|
1623
|
-
},
|
|
1624
|
-
title: "Deliverability check"
|
|
1625
|
-
};
|
|
1626
|
-
};
|
|
1627
1736
|
var audienceLists = (data) => {
|
|
1628
1737
|
const lists = rows(data, "lists");
|
|
1629
1738
|
return {
|
|
1630
1739
|
subtitle: plural(lists.length, "list"),
|
|
1631
1740
|
table: {
|
|
1632
|
-
align: [
|
|
1741
|
+
align: [LEFT3, LEFT3, RIGHT3, LEFT3],
|
|
1633
1742
|
headers: ["List", "Kind", "Size", "Created"],
|
|
1634
1743
|
rows: lists.map((list2) => [
|
|
1635
1744
|
show(list2, "name"),
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
senderHealthSchema,
|
|
19
19
|
tagSchema,
|
|
20
20
|
webhookSubscriptionSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-B72F56HF.js";
|
|
22
22
|
import {
|
|
23
23
|
plural
|
|
24
24
|
} from "./chunk-PTZO4QXR.js";
|
|
@@ -31,13 +31,13 @@ import {
|
|
|
31
31
|
senderSchema,
|
|
32
32
|
sequenceSchema,
|
|
33
33
|
workspaceSchema
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-HXCZMMSD.js";
|
|
35
|
+
import {
|
|
36
|
+
buildUrl
|
|
37
|
+
} from "./chunk-OPLXELPS.js";
|
|
35
38
|
import {
|
|
36
39
|
sourceIdFor
|
|
37
40
|
} from "./chunk-HXB2IOJJ.js";
|
|
38
|
-
import {
|
|
39
|
-
buildUrl
|
|
40
|
-
} from "./chunk-YFJ3OQZS.js";
|
|
41
41
|
import {
|
|
42
42
|
sha256Hex
|
|
43
43
|
} from "./chunk-KVAG5GM2.js";
|
|
@@ -1140,6 +1140,31 @@ var healthGet = (core) => ({
|
|
|
1140
1140
|
toOperation: (id) => ({ id, kind: "senders.health" }),
|
|
1141
1141
|
what: "Health for sender"
|
|
1142
1142
|
});
|
|
1143
|
+
var healthList = (core) => ({
|
|
1144
|
+
action: "senders.healthList",
|
|
1145
|
+
takes: { campaignId: true },
|
|
1146
|
+
keyOf: (item) => item.senderRef,
|
|
1147
|
+
prepare: (filters) => {
|
|
1148
|
+
requireCapability(
|
|
1149
|
+
core.gate,
|
|
1150
|
+
"senders.healthList",
|
|
1151
|
+
"Listing every sender's health"
|
|
1152
|
+
);
|
|
1153
|
+
if (filters.campaignId !== void 0) {
|
|
1154
|
+
requireCapability(
|
|
1155
|
+
core.gate,
|
|
1156
|
+
"senders.byCampaign",
|
|
1157
|
+
"Listing a campaign's senders"
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
return { campaignId: filters.campaignId };
|
|
1161
|
+
},
|
|
1162
|
+
schema: senderHealthSchema,
|
|
1163
|
+
toOperation: (filters, page) => ({
|
|
1164
|
+
kind: "senders.healthList",
|
|
1165
|
+
query: { ...filters, ...page }
|
|
1166
|
+
})
|
|
1167
|
+
});
|
|
1143
1168
|
var subsequenceList = (core) => ({
|
|
1144
1169
|
action: "sequence.subsequences",
|
|
1145
1170
|
takes: { campaignId: true },
|
|
@@ -1617,6 +1642,21 @@ var SCOPE_CAPABILITY = {
|
|
|
1617
1642
|
step: "stats.byStep",
|
|
1618
1643
|
workspace: "stats.workspace"
|
|
1619
1644
|
};
|
|
1645
|
+
var sendersOf = (options) => {
|
|
1646
|
+
if (options.scopeIds === void 0) {
|
|
1647
|
+
return void 0;
|
|
1648
|
+
}
|
|
1649
|
+
if (options.scope !== "sender" || options.scopeId !== void 0) {
|
|
1650
|
+
throw new OutboundError(
|
|
1651
|
+
"Invalid",
|
|
1652
|
+
"scopeIds is for the sender scope, in place of scopeId"
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
if (options.scopeIds.length === 0) {
|
|
1656
|
+
throw new OutboundError("Invalid", "scopeIds needs at least one sender");
|
|
1657
|
+
}
|
|
1658
|
+
return options.scopeIds.map((id) => assertId(id, "Sender"));
|
|
1659
|
+
};
|
|
1620
1660
|
var readStats = async (core, options = {}) => {
|
|
1621
1661
|
const scope = options.scope ?? "workspace";
|
|
1622
1662
|
const by = options.by ?? "total";
|
|
@@ -1625,8 +1665,9 @@ var readStats = async (core, options = {}) => {
|
|
|
1625
1665
|
if (from !== void 0 && to !== void 0 && from > to) {
|
|
1626
1666
|
throw new OutboundError("Invalid", "from must not be after to");
|
|
1627
1667
|
}
|
|
1668
|
+
const scopeIds = sendersOf(options);
|
|
1628
1669
|
const everyCampaign = scope === "campaign" && options.scopeId === void 0;
|
|
1629
|
-
if (scope !== "workspace" && options.scopeId === void 0 && !everyCampaign) {
|
|
1670
|
+
if (scope !== "workspace" && options.scopeId === void 0 && scopeIds === void 0 && !everyCampaign) {
|
|
1630
1671
|
throw new OutboundError(
|
|
1631
1672
|
"Invalid",
|
|
1632
1673
|
`stats for the ${scope} scope need a scopeId`
|
|
@@ -1637,6 +1678,13 @@ var readStats = async (core, options = {}) => {
|
|
|
1637
1678
|
everyCampaign ? "stats.allCampaigns" : SCOPE_CAPABILITY[scope],
|
|
1638
1679
|
everyCampaign ? "Reading stats for every campaign in one call" : `Reading stats for the ${scope} scope`
|
|
1639
1680
|
);
|
|
1681
|
+
if (scopeIds !== void 0) {
|
|
1682
|
+
requireCapability(
|
|
1683
|
+
core.gate,
|
|
1684
|
+
"stats.bySenders",
|
|
1685
|
+
"Reading stats for several senders in one call"
|
|
1686
|
+
);
|
|
1687
|
+
}
|
|
1640
1688
|
if (by === "day") {
|
|
1641
1689
|
requireCapability(core.gate, "stats.byDay", "Reading stats by day");
|
|
1642
1690
|
}
|
|
@@ -1644,7 +1692,7 @@ var readStats = async (core, options = {}) => {
|
|
|
1644
1692
|
const output2 = await core.run(
|
|
1645
1693
|
{
|
|
1646
1694
|
kind: "stats",
|
|
1647
|
-
query: { by, from, scope, scopeId: options.scopeId, to }
|
|
1695
|
+
query: { by, from, scope, scopeId: options.scopeId, scopeIds, to }
|
|
1648
1696
|
},
|
|
1649
1697
|
infoFor(core, state)
|
|
1650
1698
|
);
|
|
@@ -1933,6 +1981,7 @@ var ACCOUNT_KINDS = /* @__PURE__ */ new Set([
|
|
|
1933
1981
|
"lists.list",
|
|
1934
1982
|
"placementTests.list",
|
|
1935
1983
|
"senders.health",
|
|
1984
|
+
"senders.healthList",
|
|
1936
1985
|
"sequence.subsequences",
|
|
1937
1986
|
"tags.list",
|
|
1938
1987
|
"webhooks.get",
|
|
@@ -2015,6 +2064,20 @@ var dispatchAccount = async (target, operation) => {
|
|
|
2015
2064
|
}
|
|
2016
2065
|
return output(await adapter.listPlacementTests(operation.query, ctx));
|
|
2017
2066
|
}
|
|
2067
|
+
case "senders.healthList": {
|
|
2068
|
+
if (adapter.listSenderHealth === void 0) {
|
|
2069
|
+
throw unsupported(adapter, operation.kind);
|
|
2070
|
+
}
|
|
2071
|
+
return output(
|
|
2072
|
+
await adapter.listSenderHealth(
|
|
2073
|
+
{
|
|
2074
|
+
...operation.query,
|
|
2075
|
+
campaignId: optionalId(adapter, operation.query.campaignId)
|
|
2076
|
+
},
|
|
2077
|
+
ctx
|
|
2078
|
+
)
|
|
2079
|
+
);
|
|
2080
|
+
}
|
|
2018
2081
|
case "tags.list": {
|
|
2019
2082
|
if (adapter.listTags === void 0) {
|
|
2020
2083
|
throw unsupported(adapter, operation.kind);
|
|
@@ -2156,7 +2219,11 @@ var stats = async (target, query) => {
|
|
|
2156
2219
|
throw unsupported(adapter, "stats");
|
|
2157
2220
|
}
|
|
2158
2221
|
const rows = await adapter.stats(
|
|
2159
|
-
{
|
|
2222
|
+
{
|
|
2223
|
+
...query,
|
|
2224
|
+
scopeId: optionalId(adapter, query.scopeId),
|
|
2225
|
+
scopeIds: query.scopeIds === void 0 ? void 0 : [...new Set(query.scopeIds.map((id) => idFor(adapter, id)))]
|
|
2226
|
+
},
|
|
2160
2227
|
ctx
|
|
2161
2228
|
);
|
|
2162
2229
|
const derived = rows.some((row) => row.evidence !== "exact");
|
|
@@ -2411,6 +2478,7 @@ var Outbound = class _Outbound {
|
|
|
2411
2478
|
#layers;
|
|
2412
2479
|
campaigns;
|
|
2413
2480
|
senders;
|
|
2481
|
+
senderHealth;
|
|
2414
2482
|
leads;
|
|
2415
2483
|
messages;
|
|
2416
2484
|
replies;
|
|
@@ -2463,6 +2531,7 @@ var Outbound = class _Outbound {
|
|
|
2463
2531
|
senderList(this.#core),
|
|
2464
2532
|
senderGet(this.#core)
|
|
2465
2533
|
);
|
|
2534
|
+
this.senderHealth = makeReadCollection(this.#core, healthList(this.#core));
|
|
2466
2535
|
this.leads = makeCollection(
|
|
2467
2536
|
this.#core,
|
|
2468
2537
|
leadList(this.#core),
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
leadStanding,
|
|
7
7
|
toVariant,
|
|
8
8
|
variantKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LD5OAELW.js";
|
|
10
10
|
import {
|
|
11
11
|
eventData,
|
|
12
12
|
recordBase,
|
|
@@ -216,6 +216,7 @@ var leadRecord = (identity, lead, place) => ({
|
|
|
216
216
|
lastName: text(lead.last_name),
|
|
217
217
|
linkedinUrl: text(lead.linkedin_profile),
|
|
218
218
|
location: text(lead.location),
|
|
219
|
+
meeting: null,
|
|
219
220
|
phone: text(lead.phone_number),
|
|
220
221
|
recipientMailProvider: null,
|
|
221
222
|
tags: [...place.tags],
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
createVendorClient,
|
|
6
6
|
leadStanding,
|
|
7
7
|
listIn
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LD5OAELW.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeBody
|
|
11
11
|
} from "./chunk-FALWG5U3.js";
|
|
@@ -127,6 +127,7 @@ var fields = {
|
|
|
127
127
|
interestCategory: "derived",
|
|
128
128
|
linkedinUrl: false,
|
|
129
129
|
location: false,
|
|
130
|
+
meeting: false,
|
|
130
131
|
phone: false,
|
|
131
132
|
recipientMailProvider: false,
|
|
132
133
|
tags: false,
|
|
@@ -138,6 +139,8 @@ var fields = {
|
|
|
138
139
|
isAuto: false,
|
|
139
140
|
isAutoSource: false,
|
|
140
141
|
stepIndex: false,
|
|
142
|
+
// No link to one master inbox conversation is documented.
|
|
143
|
+
url: false,
|
|
141
144
|
variantKey: false
|
|
142
145
|
},
|
|
143
146
|
metricRow: {
|
|
@@ -163,6 +166,7 @@ var fields = {
|
|
|
163
166
|
// A fixed rule reads the sender, subject and body when automated_reply is missing.
|
|
164
167
|
leftCompany: "derived",
|
|
165
168
|
stepIndex: false,
|
|
169
|
+
url: false,
|
|
166
170
|
variantKey: false
|
|
167
171
|
},
|
|
168
172
|
sender: { linkedinUrl: false },
|
|
@@ -232,7 +236,8 @@ var caveats = [
|
|
|
232
236
|
"Webhooks: only EMAIL_SENT, MANUAL_EMAIL_SENT and TAG_ATTACHED have documented payloads. The others are read with the same data keys. Payloads carry no event id, so the id is derived from the event type and the ids in data.",
|
|
233
237
|
"Webhook signatures are not verified: the signing scheme behind webhooks_secret_key is undocumented. Put a secret in the webhook URL.",
|
|
234
238
|
"Block list entries come from two lists: emails first, then domains.",
|
|
235
|
-
"A lead list's size is leads_succeeded."
|
|
239
|
+
"A lead list's size is leads_succeeded.",
|
|
240
|
+
"A message's or reply's url is null: EmailBison documents no link to one master inbox conversation, and no read returns one."
|
|
236
241
|
];
|
|
237
242
|
|
|
238
243
|
// src/emailbison/client.ts
|
|
@@ -315,6 +320,7 @@ var toSentMessage = (identity, raw, includeBody) => ({
|
|
|
315
320
|
subject: text(raw.email_subject),
|
|
316
321
|
// A campaign email is not in the master inbox, so it has no thread there.
|
|
317
322
|
threadId: null,
|
|
323
|
+
url: null,
|
|
318
324
|
variantKey: null
|
|
319
325
|
});
|
|
320
326
|
var isOutgoing = (raw) => (text(raw.folder) ?? "").toLowerCase() === "sent";
|
|
@@ -331,6 +337,8 @@ var inboxFields = (identity, raw, includeBody) => ({
|
|
|
331
337
|
subject: text(raw.subject) ?? text(raw.email_subject),
|
|
332
338
|
// Any reply in a conversation reads the whole conversation.
|
|
333
339
|
threadId: text(raw.id),
|
|
340
|
+
// EmailBison documents no link to one master inbox conversation.
|
|
341
|
+
url: null,
|
|
334
342
|
variantKey: null
|
|
335
343
|
});
|
|
336
344
|
var toInboxMessage = (identity, raw, includeBody) => ({
|
|
@@ -523,6 +531,7 @@ var toLead = (identity, raw, campaignId = null) => {
|
|
|
523
531
|
lastName: text(raw.last_name),
|
|
524
532
|
linkedinUrl: null,
|
|
525
533
|
location: null,
|
|
534
|
+
meeting: null,
|
|
526
535
|
phone: null,
|
|
527
536
|
recipientMailProvider: null,
|
|
528
537
|
tags: [],
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
senderSchema,
|
|
12
12
|
sequenceSchema,
|
|
13
13
|
workspaceSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HXCZMMSD.js";
|
|
15
15
|
import {
|
|
16
16
|
OutboundError
|
|
17
17
|
} from "./chunk-XYHM4KHC.js";
|
|
@@ -55,12 +55,14 @@ var NO_CAPABILITIES = {
|
|
|
55
55
|
"senders.byCampaign": false,
|
|
56
56
|
"senders.get": false,
|
|
57
57
|
"senders.health": false,
|
|
58
|
+
"senders.healthList": false,
|
|
58
59
|
"senders.list": false,
|
|
59
60
|
"senders.warmup": false,
|
|
60
61
|
sequence: false,
|
|
61
62
|
"sequence.subsequences": false,
|
|
62
63
|
"stats.byDay": false,
|
|
63
64
|
"stats.bySender": false,
|
|
65
|
+
"stats.bySenders": false,
|
|
64
66
|
"stats.byStep": false,
|
|
65
67
|
"stats.allCampaigns": false,
|
|
66
68
|
"stats.campaign": false,
|